Skip to content

Commit

Permalink
[rel/17.6] Disable pre-start of testhosts (microsoft#4554)
Browse files Browse the repository at this point in the history
  • Loading branch information
nohwnd committed Jun 16, 2023
1 parent 74cbc39 commit efb2af6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,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
Original file line number Diff line number Diff line change
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 efb2af6

Please sign in to comment.