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
2824
2824
return preg_match ($ regex , $ file ) === 1 ;
2825
2825
}
2826
2826
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
+
2827
2841
function error_may_be_retried (TestFile $ test , string $ output ): bool
2828
2842
{
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 )
2830
2844
|| is_flaky ($ test );
2831
2845
}
2832
2846
You can’t perform that action at this time.
0 commit comments