AppHost.Bundle.Tests: Fix a flaky test (#32563)
authorSwaroop Sridhar <Swaroop.Sridhar@microsoft.com>
Wed, 19 Feb 2020 23:49:18 +0000 (15:49 -0800)
committerGitHub <noreply@github.com>
Wed, 19 Feb 2020 23:49:18 +0000 (23:49 +0000)
commit40a5cff8fb1097025aea9d2d112dde9e78fa066b
tree3e0f4643650a43a7846f2a98103ee330ced57e73
parentb6535f270089480996775acbc4fab3910a57a963
AppHost.Bundle.Tests: Fix a flaky test (#32563)

The BundleRename test is an inherently concurrent test which needs the app and the test infrastructure to synchronize.
Originally, the app and the test synchronized using a lock file: the app creates the lock file and waits until the lock is deleted.
However, this caused problems because the test may attempt to delete the lock file even before the app has closed it.

Therefore, this change fixes the issue by using different files to trigger the app's wait and resume steps.
src/installer/test/Assets/TestProjects/AppWithWait/Program.cs
src/installer/test/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/BundleRename.cs