aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_framework/phpbb_ui_test_case.php
diff options
context:
space:
mode:
author3D-I <480857+3D-I@users.noreply.github.com>2019-10-28 21:11:42 +0100
committer3D-I <480857+3D-I@users.noreply.github.com>2019-10-28 21:11:42 +0100
commitd136a8a9078b02433f4be08420486ad05c8129bd (patch)
tree4d3c720253ed2edef075bec7152a0ce66db16e10 /tests/test_framework/phpbb_ui_test_case.php
parent41728f2258c409480b9c3d4c1753b6eb1b47c677 (diff)
parente95e387188b050c163edcce3141c957d259810c9 (diff)
downloadforums-d136a8a9078b02433f4be08420486ad05c8129bd.tar
forums-d136a8a9078b02433f4be08420486ad05c8129bd.tar.gz
forums-d136a8a9078b02433f4be08420486ad05c8129bd.tar.bz2
forums-d136a8a9078b02433f4be08420486ad05c8129bd.tar.xz
forums-d136a8a9078b02433f4be08420486ad05c8129bd.zip
Merge branch '3.2.x' into ticket/16153
Diffstat (limited to 'tests/test_framework/phpbb_ui_test_case.php')
-rw-r--r--tests/test_framework/phpbb_ui_test_case.php21
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)