Repository navigation
Stabilize MTP server timeout test - #11655
Merged
Amaury Levé (Evangelink) merged 1 commit intoSep 30, 2026
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Amaury Levé (Evangelink)
force-pushed
the
evangelink-fix-mtp-server-timeout-flake
branch
from
September 30, 2026 09:55
eb511cf to
e415d02
Compare
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused test stabilization removes the reported race without weakening process-kill or port-release coverage.
Review effort: Balanced
Findings: None
What changed in this PR
Stabilizes the Windows MTP server timeout test by keeping its batch process alive until teardown is verified.
Changes:
- Adds a release-file rendezvous to prevent natural process exit.
- Verifies process termination and listener rebinding.
Confidence at a glance
🟢 Test-only change aligns with issue #11631 and preserves meaningful teardown assertions.
| File | Description |
|---|---|
test/UnitTests/Microsoft.Testing.Platform.ServerMode.Client.Sources.UnitTests/MtpServerProcessTests.cs |
Makes timeout teardown verification deterministic. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Amaury Levé (Evangelink)
enabled auto-merge (squash)
September 30, 2026 10:03
Amaury Levé (Evangelink)
disabled auto-merge
September 30, 2026 10:07
Amaury Levé (Evangelink)
deleted the
evangelink-fix-mtp-server-timeout-flake
branch
September 30, 2026 10:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Windows timeout test could race the timeout path with natural exit of its short-lived batch script, causing it to assert the wrong startup-failure message. The test now keeps the batch process alive with a test-controlled release file, then verifies that no survival marker is written after teardown and that the listener can still be rebound.
Fixes: #11631
Validation
\.\build.cmd -projects .\test\UnitTests\Microsoft.Testing.Platform.ServerMode.Client.Sources.UnitTests\Microsoft.Testing.Platform.ServerMode.Client.Sources.UnitTests.csproj -binaryLog- passed.\.\.dotnet\dotnet.exe exec ... --filter "FullyQualifiedName~MtpServerProcessTests.StartAsyncTimeoutKillsProcessAndReleasesListener"- passed 10/10.\.\.dotnet\dotnet.exe test --project .\test\UnitTests\Microsoft.Testing.Platform.ServerMode.Client.Sources.UnitTests\Microsoft.Testing.Platform.ServerMode.Client.Sources.UnitTests.csproj --framework net8.0 --no-build- passed (282 passed, 8 skipped).