Repository navigation
Fix flaky tests and MockServer test host timeout - #7353
Merged
Merged
Conversation
The ResolvePackageDownloadVersion_UnlistedPackage_BehavesAsExpected test intermittently hangs on Windows CI, causing the test host to crash after the 5-minute blame collector timeout. The root cause is using CancellationToken.None which allows HTTP calls to the mock server to block indefinitely when there is a transient issue. Fix: Replace CancellationToken.None with a 60-second CancellationTokenSource so the test fails fast instead of hanging the entire test host. Also add using to SourceCacheContext for proper temp file cleanup. Co-authored-by: Copilot <[email protected]>
Nigusu-Allehu
previously approved these changes
May 1, 2026
nkolev92
enabled auto-merge (squash)
May 4, 2026 16:51
nkolev92
disabled auto-merge
May 4, 2026 17:54
Member
Author
|
The same test crashed again, lol. Moving to draft. |
nkolev92
marked this pull request as draft
May 4, 2026 17:54
Replace synchronous HandleRequest (blocking GetContext) with async HandleRequestAsync using GetContextAsync and CancellationToken. This prevents MockServer.Stop() from hanging indefinitely when Abort() doesn't immediately unblock the synchronous listener call, which caused test host crashes due to 5-minute inactivity timeouts. Co-authored-by: Copilot <[email protected]>
The MockServer async refactor properly fixes the hang at the root cause level, making the CancellationTokenSource timeout unnecessary. Co-authored-by: Copilot <[email protected]>
nkolev92
marked this pull request as ready for review
May 4, 2026 20:05
Member
Author
|
Let's see how this goes :D |
nkolev92
enabled auto-merge (squash)
May 4, 2026 21:11
jeffkl
approved these changes
May 5, 2026
This was referenced May 14, 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.
Engineering
Description
Fix test host crashes caused by MockServer.Stop() hanging indefinitely, and fix a signing test race condition.
PR Checklist