Repository navigation
ci: stabilize MCP tests, run SingleStepTest on Linux only on master - #2504
Merged
Merged
Conversation
McpHttpHost started Kestrel on a background thread and swallowed bind errors, so tests polled a probe-and-released port with a ~0.4s budget. Under full parallelism on the 3-core macOS runner that budget expired. Start now binds synchronously on 127.0.0.1 (port 0 allowed), exposes the bound Port and throws on bind failure; tests use port 0 and no polling. nuget.yml now runs SingleStepTest on Linux only, like pr.yml.
Parallel tests sharing a golden key (the two DataStringsCheckedLiteralFailsOnMutatedBytes cases and AsmScenarioTest's data_strings run) wrote the same generated-code file at once; Windows fails the second writer with a sharing violation.
maximilien-noal
approved these changes
Nov 11, 2026
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.
Summary
McpHttpHost.Startnow starts Kestrel synchronously on127.0.0.1, accepts port 0, exposes the boundPortand throws on bind failure. Previously it returned before listening and swallowed bind errors, so the MCP tests' 0.4 s port polling timed out on the saturated macOS runner.IOException, whichSpice86DependencyInjectionnow catches to keep MCP optional.nuget.ymlruns SingleStepTest on Linux only, likepr.yml.Note: MCP now listens on IPv4 loopback only (no
::1).Test plan
dotnet test --project tests/Spice86.Tests -- --filter-class '*Mcp*'