From 9f92bff2452c24b8ddc8a094b431a49702c78113 Mon Sep 17 00:00:00 2001 From: unsc9 <438590997@qq.com> Date: Wed, 28 Oct 2026 22:32:03 +0800 Subject: [PATCH] test: widen the Windows temp-tree cleanup retry budget The ci-windows lane failed in archive.spec.ts's afterEach with ENOTEMPTY after the test had passed. The same cleanup flaked on 2026-10-15; the existing 10x50 ms retry budget is too short on a loaded runner. Raise it to 30x100 ms; POSIX still succeeds on the first attempt. --- tests/temp-tree.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/temp-tree.ts b/tests/temp-tree.ts index b660cbc5..1ae94736 100644 --- a/tests/temp-tree.ts +++ b/tests/temp-tree.ts @@ -13,6 +13,8 @@ * * `maxRetries` + `retryDelay` is Node's own remedy for exactly this, so every * risky cleanup goes through here instead of repeating the retry inline. + * The same archive cleanup flaked again on 2026-10-28 under a loaded runner, + * so the budget now covers a slower handle release than the original 10×50 ms. * POSIX runs are unaffected: the first attempt succeeds and no retry happens. */ import { rmSync } from 'node:fs' @@ -23,5 +25,5 @@ import { rmSync } from 'node:fs' * @param path - file or directory to remove (missing paths are ignored). */ export function removeTree(path: string): void { - rmSync(path, { recursive: true, force: true, maxRetries: 10, retryDelay: 50 }) + rmSync(path, { recursive: true, force: true, maxRetries: 30, retryDelay: 100 }) }