Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d6710c1

Browse files
minor #44643 Skip transient tests on macos (nicolas-grekas)
This PR was merged into the 4.4 branch. Discussion ---------- Skip transient tests on macos | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Commits ------- 880988c Skip transient tests on macos
2 parents 366f40a + 880988c commit d6710c1

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

.github/workflows/unit-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
([ -d "$COMPOSER_HOME" ] || mkdir "$COMPOSER_HOME") && cp .github/composer-config.json "$COMPOSER_HOME/config.json"
7575
7676
echo COLUMNS=120 >> $GITHUB_ENV
77-
echo PHPUNIT="$(pwd)/phpunit --exclude-group tty,benchmark,intl-data" >> $GITHUB_ENV
77+
echo PHPUNIT="$(pwd)/phpunit --exclude-group tty,benchmark,intl-data$([[ ${{ matrix.os }} = macos* ]] && echo ',transient-on-macos')" >> $GITHUB_ENV
7878
echo COMPOSER_UP='composer update --no-progress --ansi' >> $GITHUB_ENV
7979
8080
SYMFONY_VERSIONS=$(git ls-remote -q --heads | cut -f2 | grep -o '/[1-9][0-9]*\.[0-9].*' | sort -V)

src/Symfony/Contracts/HttpClient/Test/HttpClientTestCase.php

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -810,19 +810,22 @@ public function testTimeoutWithActiveConcurrentStream()
810810
}
811811
}
812812

813+
/**
814+
* @group transient-on-macos
815+
*/
813816
public function testTimeoutOnInitialize()
814817
{
815818
$p1 = TestHttpServer::start(8067);
816-
$p2 = TestHttpServer::start(8078);
819+
$p2 = TestHttpServer::start(8077);
817820

818821
$client = $this->getHttpClient(__FUNCTION__);
819822
$start = microtime(true);
820823
$responses = [];
821824

822825
$responses[] = $client->request('GET', 'http://localhost:8067/timeout-header', ['timeout' => 0.25]);
823-
$responses[] = $client->request('GET', 'http://localhost:8078/timeout-header', ['timeout' => 0.25]);
826+
$responses[] = $client->request('GET', 'http://localhost:8077/timeout-header', ['timeout' => 0.25]);
824827
$responses[] = $client->request('GET', 'http://localhost:8067/timeout-header', ['timeout' => 0.25]);
825-
$responses[] = $client->request('GET', 'http://localhost:8078/timeout-header', ['timeout' => 0.25]);
828+
$responses[] = $client->request('GET', 'http://localhost:8077/timeout-header', ['timeout' => 0.25]);
826829

827830
try {
828831
foreach ($responses as $response) {
@@ -843,19 +846,22 @@ public function testTimeoutOnInitialize()
843846
}
844847
}
845848

849+
/**
850+
* @group transient-on-macos
851+
*/
846852
public function testTimeoutOnDestruct()
847853
{
848854
$p1 = TestHttpServer::start(8067);
849-
$p2 = TestHttpServer::start(8078);
855+
$p2 = TestHttpServer::start(8077);
850856

851857
$client = $this->getHttpClient(__FUNCTION__);
852858
$start = microtime(true);
853859
$responses = [];
854860

855861
$responses[] = $client->request('GET', 'http://localhost:8067/timeout-header', ['timeout' => 0.25]);
856-
$responses[] = $client->request('GET', 'http://localhost:8078/timeout-header', ['timeout' => 0.25]);
862+
$responses[] = $client->request('GET', 'http://localhost:8077/timeout-header', ['timeout' => 0.25]);
857863
$responses[] = $client->request('GET', 'http://localhost:8067/timeout-header', ['timeout' => 0.25]);
858-
$responses[] = $client->request('GET', 'http://localhost:8078/timeout-header', ['timeout' => 0.25]);
864+
$responses[] = $client->request('GET', 'http://localhost:8077/timeout-header', ['timeout' => 0.25]);
859865

860866
try {
861867
while ($response = array_shift($responses)) {

0 commit comments

Comments
 (0)