Repository navigation
test(background_tasks): fix two CI flakes in eager outbox and real-Redis invalidation tests - #881
Merged
Merged
Conversation
…dis invalidation tests The eager test now awaits the delivery task with drain() instead of polling the shared in-memory SQLite connection. The real-Redis tests give a publish the delivery wait's budget: in CI the 1 s publish timeout cancelled the publisher's first connect and the message was lost. Closes #865 Claude-Session: https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Deploying simple-module-python with
|
| Latest commit: |
f3f0aaa
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://da7ce8f2.simple-module-python.pages.dev |
| Branch Preview URL: | https://fix-issue-865-bg-flakes.simple-module-python.pages.dev |
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.
Summary
Closes #865. Two tests changed; no production code.
test_eager_publish_from_a_plain_session_is_delivereddurable_transport.drain(), under a 15 sasyncio.timeout.StaticPool), so each poll's session ran on the same connection as the eager delivery's transaction.drain()is how the sibling serialization test already waits.test_background_tasks_invalidation_redis.pyPUBLISH_TIMEOUT_SECONDSto the 5 s delivery wait.test_a_second_worker_does_apply_itshows the 1 s publish timeout cancelling the publisher's first connect insidecreate_connection. The bus logged "Invalidation broadcast failed" and the message was lost.test_background_tasks_invalidation_degraded.py.The production side of the second flake is filed as #880. A cold client's first publish can lose an invalidation to the 1 s budget; the TTL floor still limits how stale the cache gets.
Verification
make lintgreen.make test-py: 8,198 passed, 28 skipped. The Redis tests ran against a live Redis.make test-js: 900 passed.https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4