Skip to content

ci(NODE-6519, NODE-6702): fix flaky listIndexes APM test and rtt calculation test #4464

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 14, 2025

Conversation

baileympearson
Copy link
Contributor

@baileympearson baileympearson commented Mar 13, 2025

Description

What is changing?

Fixes two flaky tests. I can break this into two PRs if we want.

The rtt calculation test was discussed this morning at standup.

The APM test is a bit more involved. I noticed that the assertions don't really match the test description. So, I broke the test into two tests, each with a description that matches the assertions in the test.

The flakiness was caused by replication lag - the test inserted a document and attempted to immediately listIndexes on a secondary. With w: majority, it isn't guaranteed that the secondary will have received this write yet, and the test fails. I solved this by simply squashing the error that comes back from the listIndexes command. The test asserts that we correctly report the address on command started events when reading from secondaries, so the outcome of the command isn't relevant to the assertion in the test.

Is there new documentation needed for these changes?

What is the motivation for this change?

Release Highlight

Fill in title or leave empty for no highlight

Double check the following

  • Ran npm run check:lint script
  • 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

@baileympearson baileympearson changed the title ci(NODE-6519: fix flaky listIndexes APM test ci(NODE-6519): fix flaky listIndexes APM test Mar 13, 2025
@baileympearson baileympearson changed the title ci(NODE-6519): fix flaky listIndexes APM test ci(NODE-6519, NODE-6702): fix flaky listIndexes APM test and rtt calculation test Mar 13, 2025
@baileympearson baileympearson marked this pull request as ready for review March 13, 2025 21:03
@baileympearson baileympearson requested a review from a team as a code owner March 13, 2025 21:03
@nbbeeken nbbeeken self-assigned this Mar 14, 2025
@nbbeeken nbbeeken added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Mar 14, 2025
@nbbeeken nbbeeken merged commit 86d4ca1 into main Mar 14, 2025
27 of 30 checks passed
@nbbeeken nbbeeken deleted the NODE-6519 branch March 14, 2025 19:53
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