fix: fix CI-flaky database test timing
DatabaseEventBusStore: 500ms → 2000ms for the performance threshold when cleaning 100k rows — this is intentionally a perf test so a real time assertion is correct, it just needs more headroom for CI. DatabaseKeyStore: replace fixed 500ms sleep with waitForExpect polling so the test adapts to however long the async deletion actually takes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
@@ -178,9 +178,9 @@ describe.each(databases.eachSupportedId())(
|
||||
|
||||
await store.clean();
|
||||
|
||||
// Local testing shows this takes about 80ms, but if this is flaky we can
|
||||
// reduce the count down to 10_000.
|
||||
expect(Date.now() - start).toBeLessThan(500);
|
||||
// Local testing shows this takes about 80ms, but CI containers can
|
||||
// be significantly slower under load.
|
||||
expect(Date.now() - start).toBeLessThan(2000);
|
||||
|
||||
await expect(db('event_bus_events').count()).resolves.toEqual([
|
||||
{ count: '5' },
|
||||
|
||||
Reference in New Issue
Block a user