Skip to content

Commit 4ae7641

Browse files
mzxchandraclaude
andcommitted
test(knowledge): give the member-tombstone budget test its own timeout
`finishes a pass within its page budget` times out against the shared 30s default on a loaded CI runner. It is a load flake, not a regression: the same commit went green on the `push` integration job and timed out on `migrate`, and it runs in ~4s locally. The cost is real work, not a hang. The test seeds `MEMBER_TOMBSTONE_RECONCILE_PAGES_PER_RUN * 500 + 500` documents specifically so one pass cannot finish inside a single run's budget, then observes and re-lists all of it. That volume is the assertion, so trimming it to fit the default would stop proving the multi-run path. Given its own 120s budget instead, matching the per-test timeouts already used elsewhere in this directory, with a comment recording why. Unrelated to this branch's fork-sync work - the file is byte-identical to staging and arrived with the merge - but it was failing this PR's CI, and a flake left alone becomes one everybody learns to ignore. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent f79b234 commit 4ae7641

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

‎apps/sim/lib/knowledge/__integration__/member-document-lifecycle.integration.ts‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,15 @@ describe('member document lifecycle in PostgreSQL', () => {
360360
expect((await tombstonedIds()).size).toBe(0)
361361
})
362362

363+
/**
364+
* Seeds `MEMBER_TOMBSTONE_RECONCILE_PAGES_PER_RUN * 500 + 500` documents so the pass
365+
* genuinely exceeds one run's budget - that volume is the assertion, not incidental - then
366+
* observes and re-lists all of it. ~4s locally, but the inserts and the table-wide re-list
367+
* are contention-bound, so a loaded CI runner has pushed it past the shared 30s default
368+
* (seen green on the `push` job and timing out on `migrate` for the same commit). Given its
369+
* own budget rather than trimmed, since trimming the row count would stop proving the
370+
* multi-run path.
371+
*/
363372
it('finishes a pass within its page budget while listings re-stamp every observed document', async () => {
364373
const pageBudget = MEMBER_TOMBSTONE_RECONCILE_PAGES_PER_RUN * 500
365374
const total = pageBudget + 500
@@ -404,7 +413,7 @@ describe('member document lifecycle in PostgreSQL', () => {
404413
await run()
405414
}
406415
expect(await tombstonedIds()).toEqual(new Set([firstInEveryOrder.id]))
407-
})
416+
}, 120_000)
408417

409418
it('resumes a resurrection walk from where the deadline stopped it, not from the first document', async () => {
410419
const observedAgain = Array.from({ length: 700 }, (_, index) => ({

0 commit comments

Comments
 (0)