Skip to content

PYTHON-5942 Remove redundant local SRV hostname validation tests - #3133

Merged
aclark4life merged 1 commit into
mongodb:mainfrom
aclark4life:PYTHON-5942-remove-srv-hostname-tests
Oct 19, 2026
Merged

aclark4life merged 1 commit into
mongodb:mainfrom
aclark4life:PYTHON-5942-remove-srv-hostname-tests

Conversation

@aclark4life

@aclark4life aclark4life commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

PYTHON-5942

Changes in this PR

  • Sync the identical-hostnames-valid-{three,four}-parts.json spec tests from DRIVERS-3162 into test/srv_seedlist/replica-set/.
  • Remove the PyMongo-specific prose test test_srv_hostname_with_three_or_more_parts_may_equal_the_returned_hostname from test_dns.py.

Test Plan

  • test_dns.py (sync + async) against a mongodb-runner replica set: 24 passed each.
  • The new spec tests skip locally (they need the Evergreen TLS + DNS setup) and run in Evergreen.

Checklist

Checklist for Author

  • Did you update the changelog (if necessary)?
  • Is the intention of the code captured in relevant tests?
  • If there are new TODOs, has a related JIRA ticket been created?

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?)
  • Have you checked for spelling & grammar errors?
  • Is all relevant documentation (README or docstring) updated?

@aclark4life
aclark4life marked this pull request as ready for review October 16, 2026 23:50
@aclark4life
aclark4life requested a review from a team as a code owner October 16, 2026 23:50
@aclark4life
aclark4life requested review from NoahStapp and a balanced review from Copilot October 16, 2026 23:50

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

The replacement cases fit the existing spec-test harness, and no unresolved issues were identified.

No open issues 🎉

What changed in this PR

Replaces redundant PyMongo-specific SRV hostname tests with shared specification cases, without changing driver behavior.

Changes:

  • Adds identical-hostname cases for three- and four-part SRV hostnames.
  • Removes the redundant async prose test and its generated sync counterpart.
File Description
test/​test_dns.py Removes the generated sync prose test.
test/​srv_seedlist/​replica-set/​identical-hostnames-valid-three-parts.json Adds the three-part hostname case.
test/​srv_seedlist/​replica-set/​identical-hostnames-valid-four-parts.json Adds the four-part hostname case.
test/​asynchronous/​test_dns.py Removes the redundant async prose test.

Review effort: Balanced

@aclark4life
aclark4life merged commit 5a99dc7 into mongodb:main Oct 19, 2026
79 checks passed
@aclark4life
aclark4life deleted the PYTHON-5942-remove-srv-hostname-tests branch October 19, 2026 13:50
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