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
13
13
public IntegrationTestTimeout ( ) : base ( TestTimeoutInMilliseconds ( ) )
14
14
{
15
15
}
16
+
17
+
16
18
17
19
public static int TestTimeoutInMilliseconds ( )
18
20
{
@@ -21,7 +23,18 @@ public static int TestTimeoutInMilliseconds()
21
23
return ( int ) TimeSpan . FromHours ( 1 ) . TotalMilliseconds ;
22
24
}
23
25
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 ;
25
38
}
26
39
}
27
40
}
You can’t perform that action at this time.
0 commit comments