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