Skip to content

Conversation

baileympearson
Copy link
Contributor

@baileympearson baileympearson commented Mar 5, 2025

Description

What is changing?

Fixes flakiness (hopefully) in change stream consecutive resume tests.

The tests work as follows:

  • they set up a failpoint on getMore of to fail 5 times
  • they initialize a change stream and attempt to iterate it
  • after a period of time, a change event is generated and we assert we receive the change event
  • we assert that we received 6 aggregates on the change stream (5 get more failures, the 6th one succeeds)

The last point is flaky - depending on how long each round trip takes for each resume attempt, we've seen anywhere between 3 and 6 aggregates reported. But the point of these tests is to ensure that a single change stream can survive multiple getMore failures (it gets restarted) - the exact number of aggregates doesn't matter, so long as we have more than one. So, I've relaxed the assertion to instead assert that the number of aggregates observed is > 1.

Is there new documentation needed for these changes?

What is the motivation for this change?

Release 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 marked this pull request as ready for review March 5, 2025 16:25
@baileympearson baileympearson requested a review from a team as a code owner March 5, 2025 16:25
@nbbeeken nbbeeken self-assigned this Mar 5, 2025
@nbbeeken nbbeeken added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Mar 5, 2025
@nbbeeken nbbeeken merged commit 2107200 into main Mar 5, 2025
25 of 28 checks passed
@nbbeeken nbbeeken deleted the NODE-5068-flaky-cs-tests branch March 5, 2025 17:16
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