Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The remaining documentation nit is non-blocking.
Pull request overview
Widen timing assertion tolerances in CSFLE and client backpressure integration tests to reduce flaky failures.
Changes:
- Lower the CSOT timeout bound from 498ms to 495ms.
- Add 5ms tolerance to backoff duration assertions.
- Document timing precision rationale.
File summaries
| File | Description |
|---|---|
test/integration/client-side-encryption/driver.test.ts |
Relaxes CSOT timeout timing bounds. |
test/integration/client-backpressure/client-backpressure.prose.test.ts |
Adds tolerance for backoff timing measurements. |
Review details
Suppressed comments (1)
test/integration/client-backpressure/client-backpressure.prose.test.ts:220
- This explanation says the duration is measured with a higher-resolution clock, but
measureDurationcallsprocessTimeMS(), which floorsperformance.now()to whole milliseconds (test/tools/utils.ts:535-539,src/utils.ts:441-443). Please describe the actual millisecond-truncated measurement so the rationale for this tolerance is not misleading.
// are `0.1 + 0.2 = 0.3s`. The lower bounds include a small tolerance because sleep
// timers run on a millisecond-granularity clock, so a sleep can complete marginally
// earlier than the requested duration when measured with a higher-resolution clock.
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Adds small timing tolerances to two flaky duration assertions (sleep timers run on a millisecond-granularity clock and can complete marginally early when measured with
performance.now()).Double check the following
npm run check:lint)type(NODE-xxxx)[!]: descriptionfeat(NODE-1234)!: rewriting everything in coffeescript