File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -2824,9 +2824,23 @@ function is_flaky(TestFile $test): bool
28242824 return preg_match ($ regex , $ file ) === 1 ;
28252825}
28262826
2827+ function is_flaky_output (string $ output ): bool
2828+ {
2829+ $ messages = [
2830+ '404: page not found ' ,
2831+ 'address already in use ' ,
2832+ 'connection refused ' ,
2833+ 'deadlock ' ,
2834+ 'mailbox already exists ' ,
2835+ 'timed out ' ,
2836+ ];
2837+ $ regex = '(\b( ' . implode ('| ' , $ messages ) . ')\b)i ' ;
2838+ return preg_match ($ regex , $ output ) === 1 ;
2839+ }
2840+
28272841function error_may_be_retried (TestFile $ test , string $ output ): bool
28282842{
2829- return preg_match ( ' ((timed out)|(connection refused)|(404: page not found)|(address already in use)|(mailbox already exists))i ' , $ output ) === 1
2843+ return is_flaky_output ( $ output )
28302844 || is_flaky ($ test );
28312845}
28322846
You can’t perform that action at this time.
0 commit comments