From 880988cb0b9c17d7e7c7b1df9f609d8887c35686 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 15 Dec 2021 14:33:45 +0100 Subject: [PATCH] Skip transient tests on macos --- .github/workflows/unit-tests.yml | 2 +- .../HttpClient/Test/HttpClientTestCase.php | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index d5f6c8f7c6cbb..ee8ffee658f5b 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -74,7 +74,7 @@ jobs: ([ -d "$COMPOSER_HOME" ] || mkdir "$COMPOSER_HOME") && cp .github/composer-config.json "$COMPOSER_HOME/config.json" echo COLUMNS=120 >> $GITHUB_ENV - echo PHPUNIT="$(pwd)/phpunit --exclude-group tty,benchmark,intl-data" >> $GITHUB_ENV + echo PHPUNIT="$(pwd)/phpunit --exclude-group tty,benchmark,intl-data$([[ ${{ matrix.os }} = macos* ]] && echo ',transient-on-macos')" >> $GITHUB_ENV echo COMPOSER_UP='composer update --no-progress --ansi' >> $GITHUB_ENV SYMFONY_VERSIONS=$(git ls-remote -q --heads | cut -f2 | grep -o '/[1-9][0-9]*\.[0-9].*' | sort -V) diff --git a/src/Symfony/Contracts/HttpClient/Test/HttpClientTestCase.php b/src/Symfony/Contracts/HttpClient/Test/HttpClientTestCase.php index fd7ea1a007dde..648c9174e21a5 100644 --- a/src/Symfony/Contracts/HttpClient/Test/HttpClientTestCase.php +++ b/src/Symfony/Contracts/HttpClient/Test/HttpClientTestCase.php @@ -810,19 +810,22 @@ public function testTimeoutWithActiveConcurrentStream() } } + /** + * @group transient-on-macos + */ public function testTimeoutOnInitialize() { $p1 = TestHttpServer::start(8067); - $p2 = TestHttpServer::start(8078); + $p2 = TestHttpServer::start(8077); $client = $this->getHttpClient(__FUNCTION__); $start = microtime(true); $responses = []; $responses[] = $client->request('GET', 'http://localhost:8067/timeout-header', ['timeout' => 0.25]); - $responses[] = $client->request('GET', 'http://localhost:8078/timeout-header', ['timeout' => 0.25]); + $responses[] = $client->request('GET', 'http://localhost:8077/timeout-header', ['timeout' => 0.25]); $responses[] = $client->request('GET', 'http://localhost:8067/timeout-header', ['timeout' => 0.25]); - $responses[] = $client->request('GET', 'http://localhost:8078/timeout-header', ['timeout' => 0.25]); + $responses[] = $client->request('GET', 'http://localhost:8077/timeout-header', ['timeout' => 0.25]); try { foreach ($responses as $response) { @@ -843,19 +846,22 @@ public function testTimeoutOnInitialize() } } + /** + * @group transient-on-macos + */ public function testTimeoutOnDestruct() { $p1 = TestHttpServer::start(8067); - $p2 = TestHttpServer::start(8078); + $p2 = TestHttpServer::start(8077); $client = $this->getHttpClient(__FUNCTION__); $start = microtime(true); $responses = []; $responses[] = $client->request('GET', 'http://localhost:8067/timeout-header', ['timeout' => 0.25]); - $responses[] = $client->request('GET', 'http://localhost:8078/timeout-header', ['timeout' => 0.25]); + $responses[] = $client->request('GET', 'http://localhost:8077/timeout-header', ['timeout' => 0.25]); $responses[] = $client->request('GET', 'http://localhost:8067/timeout-header', ['timeout' => 0.25]); - $responses[] = $client->request('GET', 'http://localhost:8078/timeout-header', ['timeout' => 0.25]); + $responses[] = $client->request('GET', 'http://localhost:8077/timeout-header', ['timeout' => 0.25]); try { while ($response = array_shift($responses)) {