Skip to content

tests: the mixed-writer load test checks its own sessions for idle transactions - #3344

Open
colinmegill wants to merge 1 commit into
edgefrom
mixed-writer-session-scope
Open

colinmegill wants to merge 1 commit into
edgefrom
mixed-writer-session-scope

Conversation

@colinmegill

Copy link
Copy Markdown
Member

Observable change: none. One integration test file (server/__tests__/integration/mixed-writer-load.test.ts). No schema change; no vote-path or production code.

Why: the test asserted that no session anywhere in the database sat idle in a transaction, so another Jest worker's create-user transaction could fail it (seen once in three full runs on a work box).

What changes: the idle-in-transaction assertion covers the sessions the test's own pools opened (their backend process ids), while the database-wide activity output stays for diagnosis. Regressions: an unrelated idle transaction from another connection makes the old check fail and the new one pass; a transaction left open in the test's own pool, or in the second writer process's pool, still fails it; selecting zero sessions, no ids, wrong ids or the whole database are each caught. No request, durability, load, timing, pool-limit or vote-convention assertion changed. Focused file 13 of 13; make check-server-integration 2500 passed, 7 skipped (three times by the author, once by the reviewer). Prettier, ESLint and a type check of the file clean. Independent review: publish.

🤖 Generated with Claude Code

…ansactions

The test asserted that no session anywhere in the database sat idle in a
transaction, so another Jest worker's create-user transaction could fail it
(once in three full runs on a work box). The assertion now covers the
sessions the test's own pools opened, identified by their backend process
ids, while the database-wide activity output stays for diagnosis. An
unrelated idle transaction from another connection no longer fails it; one
in the test's own pools still does, and selecting no sessions fails loudly.
No request, durability, load, timing, pool-limit or vote-convention
assertion changes. Test file only.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant