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.
This commit is contained in:
unsc9 committed 2026-10-28 22:32:03 +08:00
1 parent 5981c7f7a3
commit 9f92bff245
1 file changed
+3 -1
+3 -1
View File
@@ -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 })
}