-
Notifications
You must be signed in to change notification settings - Fork 1.8k
test(NODE-5206): fix flaky sdam prose test #4752
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
base: main
Are you sure you want to change the base?
Conversation
| const events: string[] = []; | ||
| beforeEach(async function () { | ||
| client = this.configuration.newClient({ | ||
| directConnection: true, | ||
| appName: 'SDAMPoolManagementTest', | ||
| heartbeatFrequencyMS: 500 | ||
| heartbeatFrequencyMS: 100 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spec says 500 or less, so I changed it to 100 to speed up the test.
| }); | ||
| utilClient = this.configuration.newClient({ directConnection: true }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our general pattern in tests is to have a util client for setting fail points, so I changed this in this test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we know why this test started failing much more frequently in the last few months and why it seems to most frequently (maybe only?) fail on latest servers with server API enabled?
I have no idea, but locally I could only get it to flake with the stable API enabled. Not limited to latest server as I'm on 8.0 locally, but I could not get the test to fail without the stable API enabled. And it was only one excessive failing hearbeat in the way no matter how much I tinkered with the heartbeat frequency. |
Description
Fixes the flaky SDAM prose test for connection pooling.
Summary of Changes
Updates the test to filter out rogue server heartbeat failed events.
What is the motivation for this change?
NODE-5206
Double check the following
npm run check:lint)type(NODE-xxxx)[!]: descriptionfeat(NODE-1234)!: rewriting everything in coffeescript