File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -49,18 +49,29 @@ public static EasyNetQ.Management.Client.ManagementClient InitManagementClient()
4949 return new EasyNetQ . Management . Client . ManagementClient ( managementUri , "guest" , "guest" ) ;
5050 }
5151
52- public static async Task WaitUntilFuncAsync ( Func < bool > func , ushort retries = 40 )
52+ public static async Task WaitUntilFuncAsync ( Func < bool > func , ushort retries = 20 )
5353 {
54+ int tries = 0 ;
55+ DateTime start = DateTime . Now ;
56+
57+ if ( s_isRunningInCI )
58+ {
59+ retries *= 2 ;
60+ }
61+
5462 await Task . Delay ( s_initialDelaySpan ) ;
5563
5664 while ( false == func ( ) )
5765 {
66+ tries ++ ;
5867 await Task . Delay ( s_shortDelaySpan ) ;
5968
6069 -- retries ;
6170 if ( retries == 0 )
6271 {
63- throw new XunitException ( "timed out waiting on a condition!" ) ;
72+ DateTime end = DateTime . Now ;
73+ TimeSpan duration = end - start ;
74+ throw new XunitException ( $ "timed out waiting on a condition after { duration } , tries: { tries } ") ;
6475 }
6576 }
6677 }
You can’t perform that action at this time.
0 commit comments