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
2893
2893
return preg_match ($ regex , $ file ) === 1 ;
2894
2894
}
2895
2895
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
+
2896
2910
function error_may_be_retried (TestFile $ test , string $ output ): bool
2897
2911
{
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 )
2899
2913
|| is_flaky ($ test );
2900
2914
}
2901
2915
You can’t perform that action at this time.
0 commit comments