Skip to content

Commit e318522

Browse files
test(download): retry media-download Windows tests to absorb runner cold-start variance (#1708)
* test(download): retry media-download Windows tests to absorb runner cold-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. * test(download): trim media-download retry comment to match sibling tone 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.
1 parent b6965a5 commit e318522

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/download/media-download.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ async function startServer(handler: http.RequestListener): Promise<string> {
3131
return `http://127.0.0.1:${address.port}`;
3232
}
3333

34-
describe('media downloads', () => {
34+
// Windows runners occasionally exceed the default 5s timeout on the first
35+
// http.createServer + downloadMedia roundtrip (cold-start cost on a loaded VM).
36+
describe('media downloads', { retry: process.platform === 'win32' ? 2 : 0 }, () => {
3537
it('keeps custom filenames inside the output directory', async () => {
3638
const baseUrl = await startServer((_req, res) => {
3739
res.statusCode = 200;

0 commit comments

Comments
 (0)