Skip to content

test(NODE-7219): migrate integration/server-selection/readpreference tests#4690

Closed
tadjik1 wants to merge 1 commit intomainfrom
NODE-7219
Closed

test(NODE-7219): migrate integration/server-selection/readpreference tests#4690
tadjik1 wants to merge 1 commit intomainfrom
NODE-7219

Conversation

@tadjik1
Copy link
Copy Markdown
Member

@tadjik1 tadjik1 commented Sep 29, 2025

Description

Summary of Changes

This PR migrates the integration tests for server-selection/readpreference. The changes include:

  • Commenting out or skipping ineffective tests (follow-up NODE-7219 has been created)
  • Import directly from the src folder, convert .js file test into .ts
  • Refactor callback into async/await
Notes for Reviewers

Please note that 6 first tests are ineffective now:

  • first 3 because of missing command method on the Topology class
  • next 3 because the same types we check with Typescript

I do not want to make a decision on them in this PR, and instead follow-up ticket NODE-7219 has been created.

The Hedged Reads are deprecated in MongoDB Server version 8.0, so it probably makes sense to limit tests with requires: [mongodb<8.0] (also listed in the ticket).

What is the motivation for this change?

This work is part of a larger, ongoing initiative to convert all tests to use async/await, with the ultimate goal of removing the legacy driver wrapper.

Double check the following

  • Lint is passing (npm run check:lint)
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: type(NODE-xxxx)[!]: description
    • Example: feat(NODE-1234)!: rewriting everything in coffeescript
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

@tadjik1
Copy link
Copy Markdown
Member Author

tadjik1 commented Sep 29, 2025

closed due the typo in ticket number

@tadjik1 tadjik1 closed this Sep 29, 2025
@tadjik1 tadjik1 deleted the NODE-7219 branch September 29, 2025 10:20
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.

1 participant