@@ -51,7 +51,7 @@ public class IntegrationFixture : IDisposable
5151 internal Encoding _encoding = new UTF8Encoding ( ) ;
5252
5353 public static TimeSpan RECOVERY_INTERVAL = TimeSpan . FromSeconds ( 2 ) ;
54-
54+ protected readonly TimeSpan _waitSpan ;
5555 protected readonly ITestOutputHelper _output ;
5656 protected readonly string _testDisplayName ;
5757
@@ -64,6 +64,15 @@ public IntegrationFixture(ITestOutputHelper output)
6464 _testDisplayName = test . DisplayName ;
6565
6666 SetUp ( ) ;
67+
68+ if ( IsRunningInCI ( ) )
69+ {
70+ _waitSpan = TimeSpan . FromSeconds ( 30 ) ;
71+ }
72+ else
73+ {
74+ _waitSpan = TimeSpan . FromSeconds ( 10 ) ;
75+ }
6776 }
6877
6978 protected virtual void SetUp ( )
@@ -400,7 +409,7 @@ internal void StartRabbitMQ()
400409
401410 internal void Wait ( ManualResetEventSlim latch )
402411 {
403- Assert . True ( latch . Wait ( TimeSpan . FromSeconds ( 10 ) ) , "waiting on a latch timed out" ) ;
412+ Assert . True ( latch . Wait ( _waitSpan ) , "waiting on a latch timed out" ) ;
404413 }
405414
406415 internal void Wait ( ManualResetEventSlim latch , TimeSpan timeSpan )
@@ -416,6 +425,17 @@ public static string CertificatesDirectory()
416425 {
417426 return Environment . GetEnvironmentVariable ( "SSL_CERTS_DIR" ) ;
418427 }
428+
429+ private static bool IsRunningInCI ( )
430+ {
431+ string concourse = Environment . GetEnvironmentVariable ( "CONCOURSE_CI_BUILD" ) ;
432+ string gha = Environment . GetEnvironmentVariable ( "GITHUB_ACTIONS" ) ;
433+ if ( String . IsNullOrWhiteSpace ( concourse ) && String . IsNullOrWhiteSpace ( gha ) )
434+ {
435+ return false ;
436+ }
437+ return true ;
438+ }
419439 }
420440
421441 public class TimingFixture
0 commit comments