1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Merge branch 'PHP-8.3'

* PHP-8.3:
  Retry tests on deadlock
This commit is contained in:
Ilija Tovilo
2023-11-16 16:03:08 +01:00

View File

@@ -2851,9 +2851,23 @@ function is_flaky(TestFile $test): bool
return preg_match($regex, $file) === 1;
}
function is_flaky_output(string $output): bool
{
$messages = [
'404: page not found',
'address already in use',
'connection refused',
'deadlock',
'mailbox already exists',
'timed out',
];
$regex = '(\b(' . implode('|', $messages) . ')\b)i';
return preg_match($regex, $output) === 1;
}
function error_may_be_retried(TestFile $test, string $output): bool
{
return preg_match('((timed out)|(connection refused)|(404: page not found)|(address already in use)|(mailbox already exists))i', $output) === 1
return is_flaky_output($output)
|| is_flaky($test);
}