test(engine): hold the download attempt deadline so slow runners cannot trip it - #4190
Open
miguel-heygen wants to merge 1 commit into
Open
miguel-heygen wants to merge 1 commit into
miguel-heygen wants to merge 1 commit into
Conversation
…ot trip it urlDownloader tests passed a real 1s deadline that a slow Windows attempt outlasted. The deadline timer is now held; the one test that needs it fires it by hand.
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.
What changes
Main went red on Windows in
urlDownloader.test.ts("locally refetches a caller checksum mismatch...") withDownload timeout after 1swherehash_mismatchwas expected.Cause: every download attempt starts a real 1 second deadline timer, and the tests all pass 1_000. That test runs two attempts (fetch, hash, refetch, hash); on a slow Windows runner one attempt can outlast the timer. The earlier fix (#4155) faked only
Date, so this timer was still real.No product code changes.
Verification
urlDownloader.test.ts: 81 pass, three runs in a row on a remote Linux runner, exit 0 each. Lint and format clean.Review
An independent read-only review found no blocking or should-fix items. One note: the hold matches a delay of exactly 1_000 ms, so a future test using 1_000 for something else would be held too.