Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

test(db-lock-fencing): wait for eight refresher retries, not two, so the not-aborted check keeps its old coverage

garrytan2d9d9fdc2a48
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ef06980401..7bea9eb205 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -57,7 +57,7 @@ identifiers and attribution are available in the pre-removal Git revision
**Two test-isolation flakes are fixed (found when this release's new test file moved files between CI shards).**
- `test/context-pack-pinned-federation.test.ts` set `search.remote_private_pages=visible` and left its engine in the process-wide privacy cache, so a later test file in the same CI shard saw private pages and `test/private-visibility.test.ts` failed. Its `afterAll` now resets that cache.
-- `test/db-lock-fencing.test.ts` waited a fixed 120 ms for the lock refresher's second retry, which a busy runner could miss. It now waits for the second call, up to 5 s, with the same assertions.
+- `test/db-lock-fencing.test.ts` waited a fixed 120 ms for the lock refresher's second retry, which a busy runner could miss. It now waits for eight retries, up to 5 s, so its not-aborted check still covers a run of failed refreshes, with the same assertions.
## [0.60.549.0] - 2026-11-02
diff --git a/test/db-lock-fencing.test.ts b/test/db-lock-fencing.test.ts
index 5a59ff01d3..ee5adf9fd0 100644
--- a/test/db-lock-fencing.test.ts
+++ b/test/db-lock-fencing.test.ts
@@ -169,7 +169,7 @@ describe('startCycleLockRefresher (Tier-1 #1 + D5.11)', () => {
}), controller, 'test-lock', 15);
try {
const deadline = Date.now() + 5_000;
- while (calls <= 1 && Date.now() < deadline) await new Promise(r => setTimeout(r, 15));
+ while (calls < 8 && Date.now() < deadline) await new Promise(r => setTimeout(r, 15));
expect(calls).toBeGreaterThan(1); // kept retrying
expect(controller.signal.aborted).toBe(false);
} finally {