Skip to content

Commit 60eca4b

Browse files
authored
Disable testhost prestart (#4833) (#4836)
* Disable testhost prestart * Fix test
1 parent 053d711 commit 60eca4b

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/Microsoft.TestPlatform.CrossPlatEngine/Client/Parallel/ParallelOperationManager.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ namespace Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client;
1818
/// </summary>
1919
internal sealed class ParallelOperationManager<TManager, TEventHandler, TWorkload> : IDisposable
2020
{
21-
private const int PreStart = 2;
21+
private const int PreStart = 0;
2222
private readonly static int VSTEST_HOSTPRESTART_COUNT =
2323
int.TryParse(
2424
Environment.GetEnvironmentVariable(nameof(VSTEST_HOSTPRESTART_COUNT)),

test/Microsoft.TestPlatform.CrossPlatEngine.UnitTests/Client/Parallel/ParallelProxyExecutionManagerTests.cs

+1-5
Original file line numberDiff line numberDiff line change
@@ -285,11 +285,7 @@ public void StartTestRunShouldProcessAllSourcesOnExecutionAbortsForAnySource()
285285

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

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

295291
[TestMethod]

0 commit comments

Comments
 (0)