Skip to content

Commit 366f40a

Browse files
minor symfony#44636 Try making tests a bit less transient (nicolas-grekas)
This PR was merged into the 4.4 branch. Discussion ---------- Try making tests a bit less transient | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Commits ------- b1426b4 Try making tests a bit less transient
2 parents 26d51e8 + b1426b4 commit 366f40a

File tree

5 files changed

+19
-13
lines changed

5 files changed

+19
-13
lines changed

.appveyor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ test_script:
6060
- SET SYMFONY_PHPUNIT_SKIPPED_TESTS=phpunit.skipped
6161
- copy /Y c:\php\php.ini-min c:\php\php.ini
6262
- IF %APPVEYOR_REPO_BRANCH:~-2% neq .x (rm -Rf src\Symfony\Bridge\PhpUnit)
63-
- php phpunit src\Symfony --exclude-group tty,benchmark,intl-data || SET X=!errorlevel!
63+
- php phpunit src\Symfony --exclude-group tty,benchmark,intl-data,network,transient-on-windows || SET X=!errorlevel!
6464
- copy /Y c:\php\php.ini-max c:\php\php.ini
65-
- php phpunit src\Symfony --exclude-group tty,benchmark,intl-data || SET X=!errorlevel!
65+
- php phpunit src\Symfony --exclude-group tty,benchmark,intl-data,network,transient-on-windows || SET X=!errorlevel!
6666
- exit %X%

src/Symfony/Component/Console/Tests/ApplicationTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -894,6 +894,9 @@ public function testRenderExceptionLineBreaks()
894894
$this->assertStringMatchesFormatFile(self::$fixturesPath.'/application_renderexception_linebreaks.txt', $tester->getDisplay(true), '->renderException() keep multiple line breaks');
895895
}
896896

897+
/**
898+
* @group transient-on-windows
899+
*/
897900
public function testRenderAnonymousException()
898901
{
899902
$application = new Application();
@@ -917,6 +920,9 @@ public function testRenderAnonymousException()
917920
$this->assertStringContainsString('Dummy type "class@anonymous" is invalid.', $tester->getDisplay(true));
918921
}
919922

923+
/**
924+
* @group transient-on-windows
925+
*/
920926
public function testRenderExceptionStackTraceContainsRootException()
921927
{
922928
$application = new Application();

src/Symfony/Component/Finder/Tests/Iterator/RecursiveDirectoryIteratorTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class RecursiveDirectoryIteratorTest extends IteratorTestCase
2121
public function testRewindOnFtp()
2222
{
2323
try {
24-
$i = new RecursiveDirectoryIterator('ftp://speedtest.tele2.net/', \RecursiveDirectoryIterator::SKIP_DOTS);
24+
$i = new RecursiveDirectoryIterator('ftp://speedtest:[email protected]/', \RecursiveDirectoryIterator::SKIP_DOTS);
2525
} catch (\UnexpectedValueException $e) {
2626
$this->markTestSkipped('Unsupported stream "ftp".');
2727
}
@@ -37,14 +37,14 @@ public function testRewindOnFtp()
3737
public function testSeekOnFtp()
3838
{
3939
try {
40-
$i = new RecursiveDirectoryIterator('ftp://speedtest.tele2.net/', \RecursiveDirectoryIterator::SKIP_DOTS);
40+
$i = new RecursiveDirectoryIterator('ftp://speedtest:[email protected]/', \RecursiveDirectoryIterator::SKIP_DOTS);
4141
} catch (\UnexpectedValueException $e) {
4242
$this->markTestSkipped('Unsupported stream "ftp".');
4343
}
4444

4545
$contains = [
46-
'ftp://speedtest.tele2.net'.\DIRECTORY_SEPARATOR.'1000GB.zip',
47-
'ftp://speedtest.tele2.net'.\DIRECTORY_SEPARATOR.'100GB.zip',
46+
'ftp://speedtest:[email protected]'.\DIRECTORY_SEPARATOR.'test100Mb.db',
47+
'ftp://speedtest:[email protected]'.\DIRECTORY_SEPARATOR.'test100k.db',
4848
];
4949
$actual = [];
5050

src/Symfony/Component/Lock/Tests/Store/PdoDbalStoreTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public static function tearDownAfterClass(): void
4444
*/
4545
protected function getClockDelay()
4646
{
47-
return 1000000;
47+
return 1500000;
4848
}
4949

5050
/**

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -813,16 +813,16 @@ public function testTimeoutWithActiveConcurrentStream()
813813
public function testTimeoutOnInitialize()
814814
{
815815
$p1 = TestHttpServer::start(8067);
816-
$p2 = TestHttpServer::start(8077);
816+
$p2 = TestHttpServer::start(8078);
817817

818818
$client = $this->getHttpClient(__FUNCTION__);
819819
$start = microtime(true);
820820
$responses = [];
821821

822822
$responses[] = $client->request('GET', 'http://localhost:8067/timeout-header', ['timeout' => 0.25]);
823-
$responses[] = $client->request('GET', 'http://localhost:8077/timeout-header', ['timeout' => 0.25]);
823+
$responses[] = $client->request('GET', 'http://localhost:8078/timeout-header', ['timeout' => 0.25]);
824824
$responses[] = $client->request('GET', 'http://localhost:8067/timeout-header', ['timeout' => 0.25]);
825-
$responses[] = $client->request('GET', 'http://localhost:8077/timeout-header', ['timeout' => 0.25]);
825+
$responses[] = $client->request('GET', 'http://localhost:8078/timeout-header', ['timeout' => 0.25]);
826826

827827
try {
828828
foreach ($responses as $response) {
@@ -846,16 +846,16 @@ public function testTimeoutOnInitialize()
846846
public function testTimeoutOnDestruct()
847847
{
848848
$p1 = TestHttpServer::start(8067);
849-
$p2 = TestHttpServer::start(8077);
849+
$p2 = TestHttpServer::start(8078);
850850

851851
$client = $this->getHttpClient(__FUNCTION__);
852852
$start = microtime(true);
853853
$responses = [];
854854

855855
$responses[] = $client->request('GET', 'http://localhost:8067/timeout-header', ['timeout' => 0.25]);
856-
$responses[] = $client->request('GET', 'http://localhost:8077/timeout-header', ['timeout' => 0.25]);
856+
$responses[] = $client->request('GET', 'http://localhost:8078/timeout-header', ['timeout' => 0.25]);
857857
$responses[] = $client->request('GET', 'http://localhost:8067/timeout-header', ['timeout' => 0.25]);
858-
$responses[] = $client->request('GET', 'http://localhost:8077/timeout-header', ['timeout' => 0.25]);
858+
$responses[] = $client->request('GET', 'http://localhost:8078/timeout-header', ['timeout' => 0.25]);
859859

860860
try {
861861
while ($response = array_shift($responses)) {

0 commit comments

Comments
 (0)