Skip to content

Commit

Permalink
Disable testhost prestart (#4833) (#4836)
Browse files Browse the repository at this point in the history
* Disable testhost prestart

* Fix test
  • Loading branch information
nohwnd committed Jan 19, 2024
1 parent 053d711 commit 60eca4b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Expand Up @@ -18,7 +18,7 @@ namespace Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client;
/// </summary>
internal sealed class ParallelOperationManager<TManager, TEventHandler, TWorkload> : IDisposable
{
private const int PreStart = 2;
private const int PreStart = 0;
private readonly static int VSTEST_HOSTPRESTART_COUNT =
int.TryParse(
Environment.GetEnvironmentVariable(nameof(VSTEST_HOSTPRESTART_COUNT)),
Expand Down
Expand Up @@ -285,11 +285,7 @@ public void StartTestRunShouldProcessAllSourcesOnExecutionAbortsForAnySource()

Assert.IsTrue(_executionCompleted.Wait(Timeout3Seconds), "Test run not completed.");

// Even though we start the test run for two sources, because of the current setup where
// we initialize a proxy if no more slots are available, we end up with abort notice being
// sent only to the running manager. This leaves the initialized manager in limbo and the
// assert will fail because of this.
Assert.AreEqual(1, _processedSources.Count, "Abort should stop all sources execution.");
Assert.AreEqual(2, _processedSources.Count, "Abort should stop all sources execution.");
}

[TestMethod]
Expand Down

0 comments on commit 60eca4b

Please sign in to comment.