Repository navigation
test(runtime): await usage settlement in rollback isolation test - #2179
Merged
Merged
Conversation
The rollback-isolation regression assumes the lossy recorder's default 500 ms flush has settled its usage write. A healthy but delayed driver can outlive that observation window, producing an empty row read in Python 3.12 CI. Give this non-timing regression explicit 5 s write and 6 s flush budgets. Constraint: retain all statistics, rollback and connection-restoration assertions; production timing and the dedicated timeout tests stay unchanged. Scope-risk: test-only budget change. Tested: a 600 ms SQL driver pause reproduces the exact IndexError on master and passes after the change; all 32 recorder tests pass on Linux and Windows; Ruff and changed-file pre-commit checks pass.
Contributor
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
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.
Which issue or RFC does this PR close?
Refs #2084 and #2174 (CI follow-up).
Rationale for this change
The Python 3.12 unit job in #2174 failed with
IndexErrorintest_in_memory_usage_does_not_join_outer_rollback, after the recorder reported that its default 500 ms flush observation window expired. A successful best-effortflush()return does not promise that the usage write has settled within that default window.What changes are included in this PR?
Give this rollback-isolation regression explicit 5 s write and 6 s flush budgets, as the adjacent queue-admission regression already does. Keep the persisted-usage, business-rollback and connection-restoration assertions.
Are there any user-facing changes?
None. Production deadlines, loss behavior and the dedicated timeout tests are unchanged.
How was this change tested?
IndexError; the changed test passes with the same delay.pytest tests/builtin/runtime/test_model_usage_recorder.py -q: 32 passed on Linux/Python 3.11 and 32 passed on Windows/Python 3.14.git diff --checkpassed.The driver probe models a delayed healthy driver; it does not establish the hosted runner's exact scheduling cause.
AI usage statement
Codex implemented the test-only change and ran the reported verification.