Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9b719ab

Browse filesBrowse files
minor #39720 make some time dependent tests more resilient (xabbuh)
This PR was merged into the 4.4 branch. Discussion ---------- make some time dependent tests more resilient | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | Commits ------- a33850e make some time dependent tests more resilient
2 parents eb74e5e + a33850e commit 9b719ab
Copy full SHA for 9b719ab

File tree

Expand file treeCollapse file tree

2 files changed

+5
-2
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+5
-2
lines changed

‎src/Symfony/Component/Config/Tests/Resource/DirectoryResourceTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Config/Tests/Resource/DirectoryResourceTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public function testIsFreshDeleteFile()
110110
{
111111
$resource = new DirectoryResource($this->directory);
112112
$time = time();
113-
sleep(1);
113+
usleep(1500000);
114114
unlink($this->directory.'/tmp.xml');
115115
$this->assertFalse($resource->isFresh($time), '->isFresh() returns false if an existing file is removed');
116116
}

‎src/Symfony/Component/Mailer/Tests/Transport/Smtp/SmtpTransportTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Mailer/Tests/Transport/Smtp/SmtpTransportTest.php
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
use Symfony\Component\Mime\Exception\InvalidArgumentException;
2323
use Symfony\Component\Mime\RawMessage;
2424

25+
/**
26+
* @group time-sensitive
27+
*/
2528
class SmtpTransportTest extends TestCase
2629
{
2730
public function testToString()
@@ -83,7 +86,7 @@ public function testSendDoesPingAboveThreshold()
8386
$this->assertNotContains("NOOP\r\n", $stream->getCommands());
8487

8588
$stream->clearCommands();
86-
sleep(1);
89+
usleep(1500000);
8790

8891
$transport->send(new RawMessage('Message 3'), $envelope);
8992
$this->assertContains("NOOP\r\n", $stream->getCommands());

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.