Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

test(persistence): stop the consumer before lifting the injected lock timeout in the #5762 contention case

garrytan37262866db77
diff --git a/test/persistence-sync-checkpoint-validation.test.ts b/test/persistence-sync-checkpoint-validation.test.ts
index 873de0dfe3..8d0bea93eb 100644
--- a/test/persistence-sync-checkpoint-validation.test.ts
+++ b/test/persistence-sync-checkpoint-validation.test.ts
@@ -215,7 +215,7 @@ test('#5762 a lock timeout in the validation stays transient contention', async
const f = await fixture(engine);
const restore = failValidation(engine, 'lock');
try { expect(await performManagedSync(engine, f.opts)).toMatchObject({ status: 'partial', reason: 'writer_pending' }); }
- finally { restore(); }
+ finally { await disposePersistenceConsumer(engine); restore(); }
const [checkpoint] = await engine.executeRaw<{ state: string; error_code: string | null }>(
"SELECT state,error_code FROM persistence_requests WHERE source_id=$1 AND intent->>'kind'='managed_sync_checkpoint'", [f.id]);
expect(checkpoint.error_code).toBeNull();