File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
src/ProjectTemplates/Shared Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change 6
6
using System . IO ;
7
7
using System . Linq ;
8
8
using System . Reflection ;
9
- using System . Threading ;
10
9
using System . Threading . Tasks ;
11
10
using Microsoft . AspNetCore . Internal ;
12
- using Microsoft . AspNetCore . Testing ;
13
11
using Microsoft . Extensions . CommandLineUtils ;
14
12
using Xunit ;
15
13
using Xunit . Abstractions ;
@@ -18,7 +16,6 @@ namespace Templates.Test.Helpers
18
16
{
19
17
internal static class TemplatePackageInstaller
20
18
{
21
- private static readonly SemaphoreSlim InstallerLock = new SemaphoreSlim ( 1 ) ;
22
19
private static bool _haveReinstalledTemplatePackages ;
23
20
24
21
private static readonly string [ ] _templatePackages = new [ ]
@@ -52,7 +49,7 @@ internal static class TemplatePackageInstaller
52
49
53
50
public static async Task EnsureTemplatingEngineInitializedAsync ( ITestOutputHelper output )
54
51
{
55
- Assert . True ( await InstallerLock . WaitAsync ( TimeSpan . FromMinutes ( 1 ) ) , "Unable to grab installer lock" ) ;
52
+ await ProcessLock . DotNetNewLock . WaitAsync ( ) ;
56
53
try
57
54
{
58
55
if ( ! _haveReinstalledTemplatePackages )
@@ -67,7 +64,7 @@ public static async Task EnsureTemplatingEngineInitializedAsync(ITestOutputHelpe
67
64
}
68
65
finally
69
66
{
70
- InstallerLock . Release ( ) ;
67
+ ProcessLock . DotNetNewLock . Release ( ) ;
71
68
}
72
69
}
73
70
You can’t perform that action at this time.
0 commit comments