diff --git a/c3.php b/c3.php index 1a42ef7..eedc73d 100644 --- a/c3.php +++ b/c3.php @@ -265,7 +265,8 @@ function __c3_factory($filename, $lock = false) // wait until serialized coverage data of all tests is written to file $blockfilename = realpath(C3_CODECOVERAGE_MEDIATE_STORAGE) . DIRECTORY_SEPARATOR . 'block_report'; if (file_exists($blockfilename) && filesize($blockfilename) !== 0) { - while(file_get_contents($blockfilename) !== '0') { + $retries = 120; // 30 sec total + while (file_get_contents($blockfilename) !== '0' && --$retries >= 0) { usleep(250000); // 0.25 sec } }