Repository navigation
TEST: Fix SQLite lock tests - #3121
Open
Roman Lutz (romanlutz) wants to merge 1 commit into
Open
Roman Lutz (romanlutz) wants to merge 1 commit into
Roman Lutz (romanlutz) wants to merge 1 commit into
Conversation
Drive lock deadline expiry from observed SQLITE_BUSY and a controlled request clock. Reuse isolated file memory, verify the exact reader connection's settings, arm cancellation budgets after writer setup, and observe completion without injecting cancellation. Preserve production retry semantics and semantic-report budgets. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.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.
Description
SQLite analytics lock tests can fail under loaded CI even when deadline handling is correct. The deadline test measured total wall time, including scheduling and cleanup, while cancellation tests used a one-second completion wait that could inject another cancellation. One cancellation budget also started before writer setup.
SQLITE_BUSYevent and a controlled, test-only request clock. Reuse the isolated file-memory fixture and cover report, matrix, compact report, results, and facets.This is test-only. Production retry semantics from #3065, schema, shared helpers, and CI gates are unchanged. The semantic-report tests retain their 20/30-second absolute budgets. Their historical macOS timeouts remain unresolved; this PR does not claim to fix them.
Tests and Documentation
Verified on Windows/Python 3.14.4 with default development dependencies.
Affected modules: 193 passed.
Repeated synchronization checks: five runs passed, 22 tests each, 110 total.
Exact repeated command
Type checks and applicable hooks: passed. The hooks include Ruff checks and formatting; commit-time hooks passed again without bypasses.
Private fault-injection replays reproduced the original failures: delayed restoration caused three wall-clock assertion failures and two completion-timeout failures; simulated slow writer setup caused two premature-expiry failures. After the changes, those scenarios passed all 20 projection variants and all 10 cancellation variants, respectively. The instrumentation is not part of this changeset.
Documentation and JupyText: N/A for this test-only change. macOS and full-suite CI reproduction were not performed.