From 870d57740068b122302d83c96d227e4d8eb325cc Mon Sep 17 00:00:00 2001 From: Noah Stapp Date: Thu, 2 Apr 2026 11:48:11 -0400 Subject: [PATCH 1/2] DRIVERS-3432 - Fix prose retryable writes test 6, case 3 --- source/retryable-writes/tests/README.md | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/source/retryable-writes/tests/README.md b/source/retryable-writes/tests/README.md index 77cb865091..d15fd892fd 100644 --- a/source/retryable-writes/tests/README.md +++ b/source/retryable-writes/tests/README.md @@ -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 `91` fail point command only if the failed event is for the `91` 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`. @@ -419,6 +421,8 @@ to cover the same sequence of events. ## Changelog +- 2026-04-02: Fix prose 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. From ea42cc5fa7828923d60a815c56806f844369d3ca Mon Sep 17 00:00:00 2001 From: Noah Stapp Date: Thu, 2 Apr 2026 11:51:58 -0400 Subject: [PATCH 2/2] Wording clarity --- source/retryable-writes/tests/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/retryable-writes/tests/README.md b/source/retryable-writes/tests/README.md index d15fd892fd..3f5794182f 100644 --- a/source/retryable-writes/tests/README.md +++ b/source/retryable-writes/tests/README.md @@ -404,7 +404,7 @@ to cover the same sequence of events. } ``` - Configure the `91` fail point command only if the failed event is for the `91` error configured in step 2. + 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 @@ -421,7 +421,7 @@ to cover the same sequence of events. ## Changelog -- 2026-04-02: Fix prose test for error propagation behavior when multiple errors are encountered. +- 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.