PYTHON-5798 - Overload retargeting prose tests do not ensure that sec…#2760
Merged
NoahStapp merged 4 commits intomongodb:masterfrom Apr 16, 2026
Merged
PYTHON-5798 - Overload retargeting prose tests do not ensure that sec…#2760NoahStapp merged 4 commits intomongodb:masterfrom
NoahStapp merged 4 commits intomongodb:masterfrom
Conversation
…ondaries are discovered
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the overload-retargeting retryable read prose tests to wait until the client has discovered all replica set members before asserting retargeting behavior, reducing flakiness due to incomplete topology discovery.
Changes:
- Add
ensure_all_connected(...)/async_ensure_all_connected(...)calls before running the overload-retargeting prose tests. - Update test imports to include the new connection-discovery helpers.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
test/test_retryable_reads.py |
Ensures all RS members are discovered before running overload-retargeting retryable read assertions (sync). |
test/asynchronous/test_retryable_reads.py |
Same as above for async tests, using await async_ensure_all_connected(...). |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
Author
|
Failures on MongoDB server version |
sleepyStick
approved these changes
Apr 16, 2026
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.
…ondaries are discovered
PYTHON-5798
Changes in this PR
Make overload retargeting retryable read tests wait until all nodes in the replica set have been discovered.
Test Plan
Checklist
Checklist for Author
Checklist for Reviewer