mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Merge pull request #5715 from marc1706/ticket/16078
[ticket/16078] Try using retries for timeout issue
This commit is contained in:
commit
90d425478b
1 changed files with 20 additions and 1 deletions
|
@ -157,8 +157,27 @@ class phpbb_ui_test_case extends phpbb_test_case
|
|||
}
|
||||
|
||||
public function visit($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)
|
||||
|
|
Loading…
Add table
Reference in a new issue