[Process] Make test AbstractProcessTest::testStartAfterATimeout useful again
This commit is contained in:
parent
b8e4b4af3d
commit
1be266fea0
|
@ -724,12 +724,12 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase
|
|||
|
||||
public function testStartAfterATimeout()
|
||||
{
|
||||
$process = $this->getProcess('php -r "$n = 1000; while ($n--) {echo \'\'; usleep(1000); }"');
|
||||
$process = $this->getProcess(sprintf('php -r %s', escapeshellarg('$n = 1000; while ($n--) {echo \'\'; usleep(1000); }')));
|
||||
$process->setTimeout(0.1);
|
||||
try {
|
||||
$process->run();
|
||||
$this->fail('An exception should have been raised.');
|
||||
} catch (\Exception $e) {
|
||||
$this->fail('A RuntimeException should have been raised.');
|
||||
} catch (RuntimeException $e) {
|
||||
}
|
||||
$process->start();
|
||||
usleep(10000);
|
||||
|
|
Reference in New Issue