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
Original file line number Diff line number Diff line change
Expand Up @@ -490,33 +490,35 @@ describe('Retryable Writes Spec Prose', () => {
'Case 3: Test that drivers return the correct error when receiving some errors with NoWritesPerformed and some without NoWritesPerformed',
{ requires: { topology: 'replicaset', mongodb: '>=6.0' } },
async () => {
// 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.

const serverCommandStub = sinon
.stub(Server.prototype, 'command')
.callsFake(async function () {
Expand Down
Loading