Skip to content

Commit fc2fffd

Browse files
Merge branch '4.4' into 5.3
* 4.4: Skip transient tests on macos
2 parents 9b1dcc5 + d6710c1 commit fc2fffd

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
@@ -835,19 +835,22 @@ public function testTimeoutWithActiveConcurrentStream()
835835
}
836836
}
837837

838+
/**
839+
* @group transient-on-macos
840+
*/
838841
public function testTimeoutOnInitialize()
839842
{
840843
$p1 = TestHttpServer::start(8067);
841-
$p2 = TestHttpServer::start(8078);
844+
$p2 = TestHttpServer::start(8077);
842845

843846
$client = $this->getHttpClient(__FUNCTION__);
844847
$start = microtime(true);
845848
$responses = [];
846849

847850
$responses[] = $client->request('GET', 'http://localhost:8067/timeout-header', ['timeout' => 0.25]);
848-
$responses[] = $client->request('GET', 'http://localhost:8078/timeout-header', ['timeout' => 0.25]);
851+
$responses[] = $client->request('GET', 'http://localhost:8077/timeout-header', ['timeout' => 0.25]);
849852
$responses[] = $client->request('GET', 'http://localhost:8067/timeout-header', ['timeout' => 0.25]);
850-
$responses[] = $client->request('GET', 'http://localhost:8078/timeout-header', ['timeout' => 0.25]);
853+
$responses[] = $client->request('GET', 'http://localhost:8077/timeout-header', ['timeout' => 0.25]);
851854

852855
try {
853856
foreach ($responses as $response) {
@@ -868,19 +871,22 @@ public function testTimeoutOnInitialize()
868871
}
869872
}
870873

874+
/**
875+
* @group transient-on-macos
876+
*/
871877
public function testTimeoutOnDestruct()
872878
{
873879
$p1 = TestHttpServer::start(8067);
874-
$p2 = TestHttpServer::start(8078);
880+
$p2 = TestHttpServer::start(8077);
875881

876882
$client = $this->getHttpClient(__FUNCTION__);
877883
$start = microtime(true);
878884
$responses = [];
879885

880886
$responses[] = $client->request('GET', 'http://localhost:8067/timeout-header', ['timeout' => 0.25]);
881-
$responses[] = $client->request('GET', 'http://localhost:8078/timeout-header', ['timeout' => 0.25]);
887+
$responses[] = $client->request('GET', 'http://localhost:8077/timeout-header', ['timeout' => 0.25]);
882888
$responses[] = $client->request('GET', 'http://localhost:8067/timeout-header', ['timeout' => 0.25]);
883-
$responses[] = $client->request('GET', 'http://localhost:8078/timeout-header', ['timeout' => 0.25]);
889+
$responses[] = $client->request('GET', 'http://localhost:8077/timeout-header', ['timeout' => 0.25]);
884890

885891
try {
886892
while ($response = array_shift($responses)) {

0 commit comments

Comments
 (0)