File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
source/Octopus.Tentacle.Tests.Integration/Support Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ public IntegrationTestTimeout(int timeoutInSeconds) : base((int)TimeSpan.FromSec
1313 public IntegrationTestTimeout ( ) : base ( TestTimeoutInMilliseconds ( ) )
1414 {
1515 }
16+
17+
1618
1719 public static int TestTimeoutInMilliseconds ( )
1820 {
@@ -21,7 +23,18 @@ public static int TestTimeoutInMilliseconds()
2123 return ( int ) TimeSpan . FromHours ( 1 ) . TotalMilliseconds ;
2224 }
2325
24- return ( int ) TimeSpan . FromMinutes ( 10 ) . TotalMilliseconds ;
26+ var timeoutFromEnvironmentVariable = GetTimeoutFromEnvironmentVariable ( ) ;
27+ return timeoutFromEnvironmentVariable ?? ( int ) TimeSpan . FromMinutes ( 10 ) . TotalMilliseconds ;
28+ }
29+
30+ static int ? GetTimeoutFromEnvironmentVariable ( )
31+ {
32+ if ( int . TryParse ( Environment . GetEnvironmentVariable ( "IntegrationTest_Timeout_Minutes" ) , out var timeoutFromEnv ) )
33+ {
34+ return ( int ) TimeSpan . FromMinutes ( timeoutFromEnv ) . TotalMilliseconds ;
35+ }
36+
37+ return null ;
2538 }
2639 }
2740}
You can’t perform that action at this time.
0 commit comments