Skip to content

Retry tests on deadlock #12693

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion run-tests.php
Original file line number Diff line number Diff line change
Expand Up @@ -2824,9 +2824,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);
}

Expand Down