Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions e2e/cleanup-ledger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ export async function reapEntities(
method: 'DELETE',
headers,
failOnStatusCode: false,
// Bound the reap DELETE: a DROP that hangs on postgres-customers
// contention must fail fast (45s) rather than hang teardown to the test
// timeout. The on-disk ledger backstop re-reaps on the next run.
timeout: 45_000,
})
const status = resp.status()
const bodyText = status >= 200 && status < 300 ? '' : await resp.text().catch(() => '<unreadable>')
Expand Down
7 changes: 7 additions & 0 deletions e2e/factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ export async function mintUser(
with_failed_deploy: !!opts.withFailedDeploy,
}),
failOnStatusCode: false,
// Bound the mint: with_resources provisions real DBs server-side, which can
// hang on postgres-customers contention. 45s fails fast → the spec SKIPs
// (mint==null) rather than hanging the whole test on a stalled mint.
timeout: 45_000,
})
// Inert-by-default 404: the token is wrong or the endpoint isn't armed on
// this stack. Treat as "can't mint" → null (caller SKIPS), never a red.
Expand Down Expand Up @@ -217,6 +221,9 @@ export async function reap(request: APIRequestContext, teamID: string): Promise<
method: 'DELETE',
headers: { [E2E_ACCOUNT_TOKEN_HEADER]: accountToken() },
failOnStatusCode: false,
// Bound the cohort reap: the team-cascade drops customer DBs; a hung DROP
// must fail fast (45s), not hang teardown. afterAll + ledger reaper backstop.
timeout: 45_000,
})
const ok = [200, 202, 204, 404, 410].includes(resp.status())
if (!ok) {
Expand Down
6 changes: 6 additions & 0 deletions e2e/live-anon-provision.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,12 @@ test.describe('LIVE — every anonymous provision flow → backend-assert → re
headers: id.headers,
data: JSON.stringify({ name }),
failOnStatusCode: false,
// Bound the provision call: a CREATE that intermittently hangs on
// postgres-customers contention would otherwise eat the whole test
// timeout (a hang, not slowness — raising the test timeout just makes it
// last longer). 45s fails fast → Playwright retries → passes on the next
// attempt when the contention clears. Pairs with the orphan-DB sweep.
timeout: 45_000,
})

test.skip(
Expand Down
Loading