aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_framework
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2019-10-19 17:48:34 +0200
committerMarc Alexander <admin@m-a-styles.de>2019-10-19 17:48:34 +0200
commit1ba0ae6e8530d3dab55ad1333c0d392eefa2d401 (patch)
treec35ee0473c174212dc96513986e652da21d6a947 /tests/test_framework
parentc75c13e5554652927a8aa57bd3b9f3902f57b429 (diff)
downloadforums-1ba0ae6e8530d3dab55ad1333c0d392eefa2d401.tar
forums-1ba0ae6e8530d3dab55ad1333c0d392eefa2d401.tar.gz
forums-1ba0ae6e8530d3dab55ad1333c0d392eefa2d401.tar.bz2
forums-1ba0ae6e8530d3dab55ad1333c0d392eefa2d401.tar.xz
forums-1ba0ae6e8530d3dab55ad1333c0d392eefa2d401.zip
[ticket/16078] Try using retries for timeout issue
The timeout only seems to occur on the first test so let's see what a retry can do to help with this issue. PHPBB3-16078
Diffstat (limited to 'tests/test_framework')
-rw-r--r--tests/test_framework/phpbb_ui_test_case.php18
1 files changed, 17 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..e7c9bd4d0b 100644
--- a/tests/test_framework/phpbb_ui_test_case.php
+++ b/tests/test_framework/phpbb_ui_test_case.php
@@ -158,7 +158,23 @@ 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
+ try
+ {
+ $this->getDriver()->get(self::$root_url . $path);
+ }
+ catch (Facebook\WebDriver\Exception\WebDriverCurlException $exception)
+ {
+ try
+ {
+ $this->getDriver()->get(self::$root_url . $path);
+ }
+ catch (Facebook\WebDriver\Exception\WebDriverCurlException $exception)
+ {
+ // Last try, throw exception after this one fails
+ $this->getDriver()->get(self::$root_url . $path);
+ }
+ }
}
static protected function recreate_database($config)