From 82c977bb9af873a101bd27fa772593f920d8293c Mon Sep 17 00:00:00 2001 From: Stephen Coakley Date: Sat, 26 Sep 2015 01:30:44 -0500 Subject: [PATCH] Fix test conflicts with forks not ready yet --- tests/TestCase.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/TestCase.php b/tests/TestCase.php index 7422649..6bad549 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -95,7 +95,10 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase $status = (int)$function(); exit(0); default: - pcntl_wait($status); + usleep(1e3); + if (pcntl_wait($status) === -1) { + $this->fail('Failed to fork process.'); + } return $status; } }