Fix a Race in Installer Test Infrastructure (#38143)
authorSwaroop Sridhar <Swaroop.Sridhar@microsoft.com>
Tue, 23 Jun 2020 10:14:50 +0000 (03:14 -0700)
committerGitHub <noreply@github.com>
Tue, 23 Jun 2020 10:14:50 +0000 (10:14 +0000)
commita755e742cad93fb173b47a95f68168c29ae95fb6
treec9eb25c799c8d8d87cfec8631255fcb6c9e491bd
parente84507a402670ae2a1b7d1ee633996558b54a5bd
Fix a Race in Installer Test Infrastructure (#38143)

* Re-enable Apphost.Bundle.Tests.BundleRename test

* Remove StaticHostApp

StaticHostTest used the StaticHostApp (which is effectively a copy of StandaloneApp) as a work-around for synchronization problems.
Remove this work-around.

* Synchronize GetNewTestArtifactPath()

Add locking around GetNewTestArtifactPath() so that multiple threads attempting to create new copies of a TextFixture don't collide and work on the same path.
src/installer/tests/Assets/TestProjects/StaticHostApp/Program.cs [deleted file]
src/installer/tests/Assets/TestProjects/StaticHostApp/StaticHostApp.csproj [deleted file]
src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/BundleRename.cs
src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/StaticHost.cs
src/installer/tests/TestUtils/TestApp.cs
src/installer/tests/TestUtils/TestArtifact.cs