make some time dependent tests more resilient
This commit is contained in:
parent
e1b81d513e
commit
a33850e838
@ -110,7 +110,7 @@ class DirectoryResourceTest extends TestCase
|
||||
{
|
||||
$resource = new DirectoryResource($this->directory);
|
||||
$time = time();
|
||||
sleep(1);
|
||||
usleep(1500000);
|
||||
unlink($this->directory.'/tmp.xml');
|
||||
$this->assertFalse($resource->isFresh($time), '->isFresh() returns false if an existing file is removed');
|
||||
}
|
||||
|
@ -22,6 +22,9 @@ use Symfony\Component\Mime\Email;
|
||||
use Symfony\Component\Mime\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\Mime\RawMessage;
|
||||
|
||||
/**
|
||||
* @group time-sensitive
|
||||
*/
|
||||
class SmtpTransportTest extends TestCase
|
||||
{
|
||||
public function testToString()
|
||||
@ -83,7 +86,7 @@ class SmtpTransportTest extends TestCase
|
||||
$this->assertNotContains("NOOP\r\n", $stream->getCommands());
|
||||
|
||||
$stream->clearCommands();
|
||||
sleep(1);
|
||||
usleep(1500000);
|
||||
|
||||
$transport->send(new RawMessage('Message 3'), $envelope);
|
||||
$this->assertContains("NOOP\r\n", $stream->getCommands());
|
||||
|
Reference in New Issue
Block a user