test(download): retry media-download Windows tests to absorb runner cold-start variance#1708
Open
Benjamin-eecs wants to merge 2 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses a Windows-only CI flake in the media download tests by adding a Vitest retry policy to absorb occasional cold-start/timing variance on GitHub Actions Windows runners.
Changes:
- Adds a Windows-only
{ retry: 2 }option to themedia downloadstestdescribeblock. - Documents the rationale for the retry (first roundtrip occasionally exceeding the default 5s timeout on loaded Windows runners).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…old-start variance
src/download/media-download.test.ts > 'keeps custom filenames inside the
output directory' timed out at the default 5000ms on CI run 26217100578
(Windows shard 2/2). The other two cases in the same describe block
completed in ~400ms, so the failure is cold-start cost of the first
http.createServer + downloadMedia roundtrip on a loaded GitHub Actions
Windows runner, not a logic regression.
Adopt the same { retry: process.platform === 'win32' ? 2 : 0 } describe
option that src/download/index.test.ts already uses for the same class
of Windows-only network/IO flake.
src/download/index.test.ts uses a 2-line comment for the same pattern. The CI run id + redundant cross-reference belong in commit history, not inline.
4e6f5b1 to
8abcaed
Compare
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.
Description
CI run 26217100578 (Windows shard 2/2 on commit
d4640b24) failed withsrc/download/media-download.test.ts > 'keeps custom filenames inside the output directory'timing out at the default 5000ms.The other two tests in the same
describeblock completed in ~417ms and ~156ms on the same run, so the failure is cold-start cost of the firsthttp.createServer+downloadMediaroundtrip on a loaded GitHub Actions Windows runner, not a logic regression. The 14 previous main commits in the last 5 days passed this exact shard.Adopt the same
{ retry: process.platform === 'win32' ? 2 : 0 }describe option thatsrc/download/index.test.ts:36already uses for the same class of Windows-only network/IO flake (the sibling's comment cites Windows Defender locking .tmp files; the underlying cause class is shared).Related issue: (none)
Type of Change
Checklist
Screenshots / Output
CI failure summary (Windows shard 2/2, run 26217100578):
Local re-run after the fix (3 tests pass under the new retry option):