-
Notifications
You must be signed in to change notification settings - Fork 897
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GODRIVER-2651 Break NoWritesPerformed-Only Error Sequence (#1135)
Co-authored-by: Qingyang Hu <103950869+qingyang-hu@users.noreply.github.com> Co-authored-by: Benjamin Rewis <32186188+benjirewis@users.noreply.github.com> Co-authored-by: Kevin Albertson <kevin.albertson@mongodb.com> Co-authored-by: Qingyang Hu <103950869+qingyang-hu@users.noreply.github.com> Co-authored-by: Benjamin Rewis <32186188+benjirewis@users.noreply.github.com>
- Loading branch information
1 parent
4803b59
commit 19f3fb9
Showing
4 changed files
with
181 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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
54 changes: 54 additions & 0 deletions
54
testdata/retryable-writes/unified/insertOne-noWritesPerformedError.yml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
description: "retryable-writes insertOne noWritesPerformedErrors" | ||
|
||
schemaVersion: "1.0" | ||
|
||
runOnRequirements: | ||
- minServerVersion: "6.0" | ||
topologies: [ replicaset ] | ||
|
||
createEntities: | ||
- client: | ||
id: &client0 client0 | ||
useMultipleMongoses: false | ||
observeEvents: [ commandFailedEvent ] | ||
- database: | ||
id: &database0 database0 | ||
client: *client0 | ||
databaseName: &databaseName retryable-writes-tests | ||
- collection: | ||
id: &collection0 collection0 | ||
database: *database0 | ||
collectionName: &collectionName no-writes-performed-collection | ||
|
||
tests: | ||
- description: "InsertOne fails after NoWritesPerformed error" | ||
operations: | ||
- name: failPoint | ||
object: testRunner | ||
arguments: | ||
client: *client0 | ||
failPoint: | ||
configureFailPoint: failCommand | ||
mode: | ||
times: 2 | ||
data: | ||
failCommands: | ||
- insert | ||
errorCode: 64 | ||
errorLabels: | ||
- NoWritesPerformed | ||
- RetryableWriteError | ||
- name: insertOne | ||
object: *collection0 | ||
arguments: | ||
document: | ||
x: 1 | ||
expectError: | ||
errorCode: 64 | ||
errorLabelsContain: | ||
- NoWritesPerformed | ||
- RetryableWriteError | ||
outcome: | ||
- collectionName: *collectionName | ||
databaseName: *databaseName | ||
documents: [] |
90 changes: 90 additions & 0 deletions
90
testdata/retryable-writes/unified/insertOne-noWritesPerformedErrors.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
{ | ||
"description": "retryable-writes insertOne noWritesPerformedErrors", | ||
"schemaVersion": "1.0", | ||
"runOnRequirements": [ | ||
{ | ||
"minServerVersion": "6.0", | ||
"topologies": [ | ||
"replicaset" | ||
] | ||
} | ||
], | ||
"createEntities": [ | ||
{ | ||
"client": { | ||
"id": "client0", | ||
"useMultipleMongoses": false, | ||
"observeEvents": [ | ||
"commandFailedEvent" | ||
] | ||
} | ||
}, | ||
{ | ||
"database": { | ||
"id": "database0", | ||
"client": "client0", | ||
"databaseName": "retryable-writes-tests" | ||
} | ||
}, | ||
{ | ||
"collection": { | ||
"id": "collection0", | ||
"database": "database0", | ||
"collectionName": "no-writes-performed-collection" | ||
} | ||
} | ||
], | ||
"tests": [ | ||
{ | ||
"description": "InsertOne fails after NoWritesPerformed error", | ||
"operations": [ | ||
{ | ||
"name": "failPoint", | ||
"object": "testRunner", | ||
"arguments": { | ||
"client": "client0", | ||
"failPoint": { | ||
"configureFailPoint": "failCommand", | ||
"mode": { | ||
"times": 2 | ||
}, | ||
"data": { | ||
"failCommands": [ | ||
"insert" | ||
], | ||
"errorCode": 64, | ||
"errorLabels": [ | ||
"NoWritesPerformed", | ||
"RetryableWriteError" | ||
] | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "insertOne", | ||
"object": "collection0", | ||
"arguments": { | ||
"document": { | ||
"x": 1 | ||
} | ||
}, | ||
"expectError": { | ||
"errorCode": 64, | ||
"errorLabelsContain": [ | ||
"NoWritesPerformed", | ||
"RetryableWriteError" | ||
] | ||
} | ||
} | ||
], | ||
"outcome": [ | ||
{ | ||
"collectionName": "no-writes-performed-collection", | ||
"databaseName": "retryable-writes-tests", | ||
"documents": [] | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains 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