Skip to content

Conversation

tadjik1
Copy link
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 tadjik1 marked this pull request as ready for review September 29, 2025 13:20
@tadjik1 tadjik1 requested a review from a team as a code owner September 29, 2025 13:20
@baileympearson baileympearson self-assigned this Sep 29, 2025
@baileympearson baileympearson added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Sep 29, 2025
Copy link
Contributor

@baileympearson baileympearson left a comment

Choose a reason for hiding this comment

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

Just one small comment. Otherwise LGTM

Co-authored-by: Bailey Pearson <bailey.pearson@mongodb.com>
@baileympearson baileympearson merged commit 334e97a into main Sep 30, 2025
24 of 27 checks passed
@baileympearson baileympearson deleted the NODE-7185 branch September 30, 2025 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Primary Review In Review with primary reviewer, not yet ready for team's eyes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants