test(NODE-4479): adjust number of iterations of flakey test #3378
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
What is changing?
The server selection operation count latency window test often fails because the observed percentage of requests sent to each mongos is outside the threshold. Experimenting locally does demonstrate that the percentage approaches 50% to each mongos as the total number of operations increases (which makes sense - as the total time the test runs increases, any ephemeral variations will be averaged away).
This PR bumps the total number of iterations to a number that when run locally leaves the latency window. This is purely empirical, and it is possible that the number of iterations is not high enough to reliably run in CI but I believe this should resolve the flakiness of the tests. I discussed these changes with Patrick and other drivers still see these tests flaking as well. I propose merging this PR and watching for the flakey test, and if a period of time goes by and we don't see any flakiness, we can propose modifying the spec.
Is there new documentation needed for these changes?
No.
What is the motivation for this change?
Cleaning up our flakey CI.
Double check the following
npm run check:lintscript<type>(NODE-xxxx)<!>: <description>