1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-03-13 20:28:44 +01:00

[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
This commit is contained in:
Marc Alexander 2019-10-19 17:48:34 +02:00
parent c75c13e555
commit 1ba0ae6e85
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995

View File

@ -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)