diff --git a/tests/tmp-rm.test.ts b/tests/tmp-rm.test.ts index 1faa4ea9cc..80c0d52fe0 100644 --- a/tests/tmp-rm.test.ts +++ b/tests/tmp-rm.test.ts @@ -73,8 +73,8 @@ test("rmrf: a transient storm past the budget throws after the full ladder", () } finally { _setRmImplForTest(); } - assert.equal(calls, 8, "one attempt + all seven backoffs, then give up"); - assert.ok(Date.now() - t0 >= 3100, "paid the 25..1600ms ladder (~3.2s)"); + assert.equal(calls, 10, "one attempt + all nine backoffs, then give up"); + assert.ok(Date.now() - t0 >= 9400, "paid the 25..3200ms ladder (~9.6s)"); }); test("rmrf: non-transient errors throw at once, no backoff", () => { diff --git a/tests/tmp-rm.ts b/tests/tmp-rm.ts index fa79772147..019dbcbb82 100644 --- a/tests/tmp-rm.ts +++ b/tests/tmp-rm.ts @@ -9,9 +9,16 @@ import { rmSync } from "node:fs"; // ubuntu-22 release-gate leg — the failing suite's late debounced session // flush (5ms debounce recreating //) kept the tree alive past // every retry under full-suite load. Escalate with exponential backoff so -// teardown can always outlive a bounded writer burst; the full window is -// ~3.2s and is only paid when a race actually happens. -const RETRY_DELAYS_MS = [25, 50, 100, 200, 400, 800, 1600] as const; +// teardown can always outlive a bounded writer burst; the ladder below sums +// the full window and is only paid when a race actually happens. +// +// #2908: #2816's c=4 concurrent test scheduling raised per-runner load, and a +// win-latest leg then lost the race on EBUSY unlinking sessions/index.db — a +// transient Windows AV/indexer lock outlasting the old ~3.2s window (#2799 +// family). A probe confirmed the harness holds NO self-handle at rmrf time +// (flushAllSessions closes the store's shadow first), so this is not masking +// an in-process leak: it re-sizes the external-lock budget to the c=4 reality. +const RETRY_DELAYS_MS = [25, 50, 100, 200, 400, 800, 1600, 3200, 3200] as const; /** Sync sleep that is legal on any thread in Node (blocks the event loop — * exactly what a teardown-path retry wants; no pending I/O ordering to keep). */