diff options
Diffstat (limited to 'tests/test_framework/phpbb_ui_test_case.php')
-rw-r--r-- | tests/test_framework/phpbb_ui_test_case.php | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/tests/test_framework/phpbb_ui_test_case.php b/tests/test_framework/phpbb_ui_test_case.php index 4d88d7d9cb..48e510abe3 100644 --- a/tests/test_framework/phpbb_ui_test_case.php +++ b/tests/test_framework/phpbb_ui_test_case.php @@ -158,7 +158,26 @@ class phpbb_ui_test_case extends phpbb_test_case public function visit($path) { - $this->getDriver()->get(self::$root_url . $path); + // Retry three times on curl issues, e.g. timeout + $attempts = 0; + $retries = 3; + + while (true) + { + $attempts++; + try + { + $this->getDriver()->get(self::$root_url . $path); + break; + } + catch (Facebook\WebDriver\Exception\WebDriverCurlException $exception) + { + if ($attempts >= $retries) + { + throw $exception; + } + } + } } static protected function recreate_database($config) |