Re-enable test parallelization. Fixes #63.
This commit is contained in:
parent
f79fa6e110
commit
7961894771
|
|
@ -15,6 +15,8 @@ namespace Templates.Test
|
||||||
{
|
{
|
||||||
public class TemplateTestBase : IDisposable
|
public class TemplateTestBase : IDisposable
|
||||||
{
|
{
|
||||||
|
private static object DotNetNewLock = new object();
|
||||||
|
|
||||||
protected string ProjectName { get; set; }
|
protected string ProjectName { get; set; }
|
||||||
protected string TemplateOutputDir { get; private set; }
|
protected string TemplateOutputDir { get; private set; }
|
||||||
protected ITestOutputHelper Output { get; private set; }
|
protected ITestOutputHelper Output { get; private set; }
|
||||||
|
|
@ -63,7 +65,12 @@ namespace Templates.Test
|
||||||
args += $" -lang {language}";
|
args += $" -lang {language}";
|
||||||
}
|
}
|
||||||
|
|
||||||
ProcessEx.Run(Output, TemplateOutputDir, DotNetMuxer.MuxerPathOrDefault(), args).WaitForExit(assertSuccess: true);
|
// Only run one instance of 'dotnet new' at once, as a workaround for
|
||||||
|
// https://github.com/aspnet/templating/issues/63
|
||||||
|
lock (DotNetNewLock)
|
||||||
|
{
|
||||||
|
ProcessEx.Run(Output, TemplateOutputDir, DotNetMuxer.MuxerPathOrDefault(), args).WaitForExit(assertSuccess: true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void RunNpmInstall()
|
protected void RunNpmInstall()
|
||||||
|
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
// Copyright (c) .NET Foundation. All rights reserved.
|
|
||||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
|
||||||
|
|
||||||
[assembly: Xunit.CollectionBehavior(DisableTestParallelization = true)]
|
|
||||||
Loading…
Reference in New Issue