File tree 1 file changed +15
-1
lines changed
1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -2851,9 +2851,23 @@ function is_flaky(TestFile $test): bool
2851
2851
return preg_match ($ regex , $ file ) === 1 ;
2852
2852
}
2853
2853
2854
+ function is_flaky_output (string $ output ): bool
2855
+ {
2856
+ $ messages = [
2857
+ '404: page not found ' ,
2858
+ 'address already in use ' ,
2859
+ 'connection refused ' ,
2860
+ 'deadlock ' ,
2861
+ 'mailbox already exists ' ,
2862
+ 'timed out ' ,
2863
+ ];
2864
+ $ regex = '(\b( ' . implode ('| ' , $ messages ) . ')\b)i ' ;
2865
+ return preg_match ($ regex , $ output ) === 1 ;
2866
+ }
2867
+
2854
2868
function error_may_be_retried (TestFile $ test , string $ output ): bool
2855
2869
{
2856
- return preg_match ( ' ((timed out)|(connection refused)|(404: page not found)|(address already in use)|(mailbox already exists))i ' , $ output ) === 1
2870
+ return is_flaky_output ( $ output )
2857
2871
|| is_flaky ($ test );
2858
2872
}
2859
2873
You can’t perform that action at this time.
0 commit comments