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 @@ -2893,9 +2893,23 @@ function is_flaky(TestFile $test): bool
28932893 return preg_match ($ regex , $ file ) === 1 ;
28942894}
28952895
2896+ function is_flaky_output (string $ output ): bool
2897+ {
2898+ $ messages = [
2899+ '404: page not found ' ,
2900+ 'address already in use ' ,
2901+ 'connection refused ' ,
2902+ 'deadlock ' ,
2903+ 'mailbox already exists ' ,
2904+ 'timed out ' ,
2905+ ];
2906+ $ regex = '(\b( ' . implode ('| ' , $ messages ) . ')\b)i ' ;
2907+ return preg_match ($ regex , $ output ) === 1 ;
2908+ }
2909+
28962910function error_may_be_retried (TestFile $ test , string $ output ): bool
28972911{
2898- return preg_match ( ' ((timed out)|(connection refused)|(404: page not found)|(address already in use)|(mailbox already exists))i ' , $ output ) === 1
2912+ return is_flaky_output ( $ output )
28992913 || is_flaky ($ test );
29002914}
29012915
You can’t perform that action at this time.
0 commit comments