Unverified Commit 2c709ec1 authored by Alex Pott's avatar Alex Pott
Browse files

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
parent 09345e1f
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -426,13 +426,14 @@ protected function instantiateServer($port, $working_dir = NULL) {
      ->start();
    // 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);
    }
    throw new \RuntimeException(sprintf("Unable to start the web server.\nERROR OUTPUT:\n%s", $ps->getErrorOutput()));

    throw new \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()));
  }

  /**