diff --git a/test/Templates.Test/Helpers/TemplateTestBase.cs b/test/Templates.Test/Helpers/TemplateTestBase.cs index 54854d6c75..f8466e1ea8 100644 --- a/test/Templates.Test/Helpers/TemplateTestBase.cs +++ b/test/Templates.Test/Helpers/TemplateTestBase.cs @@ -15,6 +15,8 @@ namespace Templates.Test { public class TemplateTestBase : IDisposable { + private static object DotNetNewLock = new object(); + protected string ProjectName { get; set; } protected string TemplateOutputDir { get; private set; } protected ITestOutputHelper Output { get; private set; } @@ -63,7 +65,12 @@ namespace Templates.Test 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() diff --git a/test/Templates.Test/Properties/TestAttributes.cs b/test/Templates.Test/Properties/TestAttributes.cs deleted file mode 100644 index 69295a81d1..0000000000 --- a/test/Templates.Test/Properties/TestAttributes.cs +++ /dev/null @@ -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)]