Repository navigation
tests: the mixed-writer load test checks its own sessions for idle transactions - #3344
Open
colinmegill wants to merge 1 commit into
Open
colinmegill wants to merge 1 commit into
colinmegill wants to merge 1 commit into
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-integration2500 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