Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable testhost prestart #4833

Merged
merged 2 commits into from Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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