diff options
author | Marc Alexander <admin@m-a-styles.de> | 2019-10-20 20:39:12 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2019-10-20 20:39:12 +0200 |
commit | 49ea5a409110a92fb978744944ea813b54bab488 (patch) | |
tree | 333f612f85e15b6444f215175a092570c5e51fba /tests | |
parent | d9f9360c5b06b4acdf86e716b4dcc64823287c26 (diff) | |
parent | 90d425478be22b48dfe8430432af79c24d137434 (diff) | |
download | forums-49ea5a409110a92fb978744944ea813b54bab488.tar forums-49ea5a409110a92fb978744944ea813b54bab488.tar.gz forums-49ea5a409110a92fb978744944ea813b54bab488.tar.bz2 forums-49ea5a409110a92fb978744944ea813b54bab488.tar.xz forums-49ea5a409110a92fb978744944ea813b54bab488.zip |
Merge branch '3.2.x' into 3.3.x
Diffstat (limited to 'tests')
-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 6d6d29d001..fcac3594d0 100644 --- a/tests/test_framework/phpbb_ui_test_case.php +++ b/tests/test_framework/phpbb_ui_test_case.php @@ -153,7 +153,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) |