mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Retry tests on deadlock
Closes GH-12693
This commit is contained in:
parent
a742010a0a
commit
58712e0698
1 changed files with 15 additions and 1 deletions
|
@ -2824,9 +2824,23 @@ function is_flaky(TestFile $test): bool
|
||||||
return preg_match($regex, $file) === 1;
|
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
|
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);
|
|| is_flaky($test);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue