Skip to content

PYTHON-6056 Reduce flakiness in search index helper prose tests - #3166

Merged
NoahStapp merged 1 commit into
mongodb:mainfrom
NoahStapp:PYTHON-6056-1
Oct 29, 2026
Merged

NoahStapp merged 1 commit into
mongodb:mainfrom
NoahStapp:PYTHON-6056-1

Conversation

@NoahStapp

Copy link
Copy Markdown
Contributor

PYTHON-6056 followup.

Changes in this PR

Retry up to a 10 minute timeout for transient search index management errors during the search index management tests and their cleanup. Reduce code duplication in similar tests.

Test Plan

Existing test changes.

Checklist

Checklist for Author

  • Did you update the changelog (if necessary)?
  • Is there test coverage?
  • Is any followup work tracked in a JIRA ticket? If so, add link(s).

Checklist for Reviewer

  • Does the title of the PR reference a JIRA Ticket?
  • Do you fully understand the implementation? (Would you be comfortable explaining how this code works to someone else?)
  • Is all relevant documentation (README or docstring) updated?

Copilot AI balanced review requested due to automatic review settings October 29, 2026 18:04
@NoahStapp
NoahStapp requested a review from a team as a code owner October 29, 2026 18:04
@NoahStapp
NoahStapp requested a review from sleepyStick October 29, 2026 18:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified for the search-index polling and retry changes.

No open issues 🎉

What changed in this PR

This PR reduces flakiness in PyMongo’s search index management tests by centralizing polling and retrying transient search service connection errors.

Changes:

  • Adds a shared polling helper with a 10-minute timeout and five-second retry interval.
  • Uses the helper for index readiness, drop requests, and deletion checks.
  • Removes duplicated deletion polling from the prose test.
File Description
test/​test_index_management.py Mirrors the retry and polling changes in the generated synchronous tests.
test/​asynchronous/​test_index_management.py Adds asynchronous retry polling and reuses it for readiness and deletion checks.

Review effort: Balanced

@NoahStapp
NoahStapp merged commit 3879772 into mongodb:main Oct 29, 2026
80 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants