Issue #3214565 by Spokje, longwave, alexpott, Lendude: [random test failure]...
Issue #3214565 by Spokje, longwave, alexpott, Lendude: [random test failure] Random fail in BuildTestTest::testPortMany
(cherry picked from commit 2c709ec1)
// Wait until the web server has started. It is started if the port is no
// longer available.
for($i=0;$i<1000;$i++){
for($i=0;$i<50;$i++){
usleep(100000);
if(!$this->checkPortIsAvailable($port)){
return$ps;
}
usleep(1000);
}
thrownew\RuntimeException(sprintf("Unable to start the web server.\nERROR OUTPUT:\n%s",$ps->getErrorOutput()));
thrownew\RuntimeException(sprintf("Unable to start the web server.\nCMD: %s \nCODE: %d\nSTATUS: %s\nOUTPUT:\n%s\n\nERROR OUTPUT:\n%s",$ps->getCommandLine(),$ps->getExitCode(),$ps->getStatus(),$ps->getOutput(),$ps->getErrorOutput()));