Skip to content

test(NODE-7534): add prose tests for retry behavior with mixed overload/non-overload errors#4921

Open
nbbeeken wants to merge 4 commits intomainfrom
NODE-7534
Open

test(NODE-7534): add prose tests for retry behavior with mixed overload/non-overload errors#4921
nbbeeken wants to merge 4 commits intomainfrom
NODE-7534

Conversation

@nbbeeken
Copy link
Copy Markdown
Contributor

Description

Summary of Changes

  • Add 4 new prose tests per spec commit 7039e69
  • Test 4 (reads/writes): Verify MAX_RETRIES applies to all errors after overload
  • Test 5 (reads/writes): Verify backoff only applies to overload errors
  • Uses mocking pattern consistent with existing prose tests
Notes for Reviewers

WIP

What is the motivation for this change?

Coverage reccomended by spec

Double check the following

  • Lint is passing (npm run check:lint)
  • 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

…-overload errors

- Add 4 new prose tests per spec commit 7039e69
- Test 4 (reads/writes): Verify MAX_RETRIES applies to all errors after overload
- Test 5 (reads/writes): Verify backoff only applies to overload errors
- Uses mocking pattern consistent with existing prose tests
@nbbeeken nbbeeken marked this pull request as ready for review April 16, 2026 17:15
@nbbeeken nbbeeken requested a review from a team as a code owner April 16, 2026 17:15
Copilot AI review requested due to automatic review settings April 16, 2026 17:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds new prose integration tests to validate the driver’s retry behavior when encountering an initial SystemOverloadedError followed by subsequent non-overload retryable errors, per the referenced spec guidance.

Changes:

  • Add new retryable-writes prose cases to verify MAX_RETRIES is honored across mixed overload/non-overload retryable write errors.
  • Add new retryable-reads prose cases to verify MAX_RETRIES is honored across mixed overload/non-overload retryable read errors.
  • Add timing-based assertions (via measureDuration) to ensure backoff is only applied to overload-labeled errors.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
test/integration/retryable-writes/retryable_writes.spec.prose.test.ts Adds Case 4/5 prose tests for mixed overload/non-overload retry behavior and backoff timing for retryable writes.
test/integration/retryable-reads/retryable_reads.spec.prose.test.ts Adds new prose suites to validate max-retry behavior and backoff timing for retryable reads under mixed error-label sequences.

Comment thread test/integration/retryable-reads/retryable_reads.spec.prose.test.ts Outdated
Comment thread test/integration/retryable-reads/retryable_reads.spec.prose.test.ts Outdated
Comment thread test/integration/retryable-reads/retryable_reads.spec.prose.test.ts
@tadjik1 tadjik1 self-assigned this Apr 20, 2026
@tadjik1 tadjik1 added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Apr 20, 2026
@tadjik1 tadjik1 added the Team Review Needs review from team label Apr 21, 2026
@tadjik1 tadjik1 removed their assignment Apr 21, 2026
@tadjik1 tadjik1 removed Primary Review In Review with primary reviewer, not yet ready for team's eyes Team Review Needs review from team labels Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants