File tree Expand file tree Collapse file tree 3 files changed +14
-14
lines changed
test/WebJobs.Script.Tests.Shared Expand file tree Collapse file tree 3 files changed +14
-14
lines changed Original file line number Diff line number Diff line change 45
45
</ItemGroup >
46
46
47
47
<ItemGroup >
48
- <PackageReference Include =" Microsoft.AspNetCore.App" Version =" 2.1.2 " />
48
+ <PackageReference Include =" Microsoft.AspNetCore.App" Version =" 2.1.4 " />
49
49
<PackageReference Include =" Microsoft.AspNetCore.Buffering" Version =" 0.4.0-preview2-28189" />
50
50
<PackageReference Include =" Microsoft.Azure.AppService.Proxy.Client" Version =" 2.0.5350001-beta-fc119b98" />
51
51
<PackageReference Include =" Microsoft.AspNetCore.Server.IIS" Version =" 2.1.0-a-oob-2-1-oob-17035" />
Original file line number Diff line number Diff line change 25
25
<PackageReference Include =" Google.Protobuf" Version =" 3.5.1" />
26
26
<PackageReference Include =" Grpc.Core" Version =" 1.12.0" />
27
27
<PackageReference Include =" Microsoft.ApplicationInsights" Version =" 2.7.2" />
28
- <PackageReference Include =" Microsoft.AspNetCore.Mvc.WebApiCompatShim" Version =" 2.1.1 " >
28
+ <PackageReference Include =" Microsoft.AspNetCore.Mvc.WebApiCompatShim" Version =" 2.1.2 " >
29
29
<NoWarn >NU1701</NoWarn >
30
30
</PackageReference >
31
31
<PackageReference Include =" Microsoft.Azure.AppService.Proxy.Client" Version =" 2.0.5350001-beta-fc119b98" />
Original file line number Diff line number Diff line change @@ -28,18 +28,6 @@ public static partial class TestHelpers
28
28
private const string Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" ;
29
29
private static readonly Random Random = new Random ( ) ;
30
30
31
- public static async Task RunWithTimeoutAsync ( Func < Task > action , TimeSpan timeout )
32
- {
33
- Task timeoutTask = Task . Delay ( timeout ) ;
34
- Task actionTask = action ( ) ;
35
- Task completedTask = await Task . WhenAny ( actionTask , timeoutTask ) ;
36
-
37
- if ( completedTask == timeoutTask )
38
- {
39
- throw new Exception ( $ "Task did not complete within timeout interval { timeout } .") ;
40
- }
41
- }
42
-
43
31
/// <summary>
44
32
/// Gets the common root directory that functions tests create temporary directories under.
45
33
/// This enables us to clean up test files by deleting this single directory.
@@ -52,6 +40,18 @@ public static string FunctionsTestDirectory
52
40
}
53
41
}
54
42
43
+ public static async Task RunWithTimeoutAsync ( Func < Task > action , TimeSpan timeout )
44
+ {
45
+ Task timeoutTask = Task . Delay ( timeout ) ;
46
+ Task actionTask = action ( ) ;
47
+ Task completedTask = await Task . WhenAny ( actionTask , timeoutTask ) ;
48
+
49
+ if ( completedTask == timeoutTask )
50
+ {
51
+ throw new Exception ( $ "Task did not complete within timeout interval { timeout } .") ;
52
+ }
53
+ }
54
+
55
55
public static byte [ ] GenerateKeyBytes ( )
56
56
{
57
57
using ( var aes = new AesManaged ( ) )
You can’t perform that action at this time.
0 commit comments