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 @@ -2853,9 +2853,23 @@ function is_flaky(TestFile $test): bool
28532853 return preg_match ($ regex , $ file ) === 1 ;
28542854}
28552855
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+
28562870function error_may_be_retried (TestFile $ test , string $ output ): bool
28572871{
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 )
28592873 || is_flaky ($ test );
28602874}
28612875
You can’t perform that action at this time.
0 commit comments