Skip to content

Commit

Permalink
[Process] Avoid failures because of slow IOs
Browse files Browse the repository at this point in the history
  • Loading branch information
romainneutron committed Mar 14, 2014
1 parent 238565e commit 783e377
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Symfony/Component/Process/Tests/AbstractProcessTest.php
Expand Up @@ -203,7 +203,7 @@ public function testGetErrorOutput()

public function testGetIncrementalErrorOutput()
{
$p = $this->getProcess(sprintf('php -r %s', escapeshellarg('$n = 0; while ($n < 3) { usleep(50000); file_put_contents(\'php://stderr\', \'ERROR\'); $n++; }')));
$p = $this->getProcess(sprintf('php -r %s', escapeshellarg('$n = 0; while ($n < 3) { usleep(100000); file_put_contents(\'php://stderr\', \'ERROR\'); $n++; }')));

$p->start();
while ($p->isRunning()) {
Expand Down Expand Up @@ -250,7 +250,7 @@ public function testTTYCommand()
$this->markTestSkipped('Windows does have /dev/tty support');
}

$process = $this->getProcess('echo "foo" >> /dev/null');
$process = $this->getProcess('echo "foo" >> /dev/null && php -r "usleep(100000);"');
$process->setTTY(true);
$process->start();
$this->assertTrue($process->isRunning());
Expand Down Expand Up @@ -471,7 +471,7 @@ public function testRestart()
$process1->run();
$process2 = $process1->restart();

usleep(300000); // wait for output
$process2->wait(); // wait for output

// Ensure that both processed finished and the output is numeric
$this->assertFalse($process1->isRunning());
Expand Down

0 comments on commit 783e377

Please sign in to comment.