Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions source/retryable-writes/tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -372,38 +372,40 @@ to cover the same sequence of events.

#### Case 3: Test that drivers return the correct error when receiving some errors with `NoWritesPerformed` and some without `NoWritesPerformed`

1. Create a client with `retryWrites=true` and `monitorCommands=true`.
1. Create a client with `retryWrites=true`.

2. Configure the client to listen to CommandFailedEvents. In the attached listener, configure a fail point with error
code `91` (NotWritablePrimary) and the `NoWritesPerformed`, `RetryableError` and `SystemOverloadedError` labels:
2. Configure a fail point with error code `91` (ShutdownInProgress) with the `RetryableError` and
`SystemOverloadedError` error labels:

```javascript
{
configureFailPoint: "failCommand",
mode: "alwaysOn",
mode: {times: 1},
data: {
failCommands: ["insert"],
errorLabels: ["RetryableError", "SystemOverloadedError", "NoWritesPerformed"],
errorLabels: ["RetryableError", "SystemOverloadedError"],
errorCode: 91
}
}
```

3. Configure a fail point with error code `91` (ShutdownInProgress) with the `RetryableError` and
`SystemOverloadedError` error labels but without the `NoWritesPerformed` error label:
3. Via the command monitoring CommandFailedEvent, configure a fail point with error code `91` (ShutdownInProgress) and
the `NoWritesPerformed`, `RetryableError` and `SystemOverloadedError` labels:

```javascript
{
configureFailPoint: "failCommand",
mode: {times: 1},
mode: "alwaysOn",
data: {
failCommands: ["insert"],
errorLabels: ["RetryableError", "SystemOverloadedError"],
errorLabels: ["RetryableError", "SystemOverloadedError", "NoWritesPerformed"],
errorCode: 91
}
}
```

Configure the second fail point command only if the failed event is for the first error configured in step 2.

4. Attempt an `insertOne` operation on any record for any database and collection. Expect the `insertOne` to fail with a
server error. Assert that the error code of the server error is 91. Assert that the error does not contain the
error label `NoWritesPerformed`.
Expand All @@ -419,6 +421,8 @@ to cover the same sequence of events.

## Changelog

- 2026-04-02: Fix test for error propagation behavior when multiple errors are encountered.

- 2026-02-17: Fix test for error propagation behavior when multiple errors are encountered.

- 2026-02-03: Add tests for error propagation behavior when multiple errors are encountered.
Expand Down
Loading