aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2019-10-20 20:39:07 +0200
committerMarc Alexander <admin@m-a-styles.de>2019-10-20 20:39:07 +0200
commit90d425478be22b48dfe8430432af79c24d137434 (patch)
tree0a2f3732e608fb7991e3047b20f8c3f724575718
parent6b6a24ffb3f9cf3096d14317fec56273ba0046ae (diff)
parent8b6776eed22edc33b3f35946fba6b5de4bfe73a1 (diff)
downloadforums-90d425478be22b48dfe8430432af79c24d137434.tar
forums-90d425478be22b48dfe8430432af79c24d137434.tar.gz
forums-90d425478be22b48dfe8430432af79c24d137434.tar.bz2
forums-90d425478be22b48dfe8430432af79c24d137434.tar.xz
forums-90d425478be22b48dfe8430432af79c24d137434.zip
Merge pull request #5715 from marc1706/ticket/16078
[ticket/16078] Try using retries for timeout issue
-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)