| 1 | description: "retryable-writes insertOne noWritesPerformedErrors" |
| 2 | |
| 3 | schemaVersion: "1.0" |
| 4 | |
| 5 | runOnRequirements: |
| 6 | - minServerVersion: "6.0" |
| 7 | topologies: [ replicaset ] |
| 8 | |
| 9 | createEntities: |
| 10 | - client: |
| 11 | id: &client0 client0 |
| 12 | useMultipleMongoses: false |
| 13 | observeEvents: [ commandFailedEvent ] |
| 14 | - database: |
| 15 | id: &database0 database0 |
| 16 | client: *client0 |
| 17 | databaseName: &databaseName retryable-writes-tests |
| 18 | - collection: |
| 19 | id: &collection0 collection0 |
| 20 | database: *database0 |
| 21 | collectionName: &collectionName no-writes-performed-collection |
| 22 | |
| 23 | tests: |
| 24 | - description: "InsertOne fails after NoWritesPerformed error" |
| 25 | operations: |
| 26 | - name: failPoint |
| 27 | object: testRunner |
| 28 | arguments: |
| 29 | client: *client0 |
| 30 | failPoint: |
| 31 | configureFailPoint: failCommand |
| 32 | mode: |
| 33 | times: 2 |
| 34 | data: |
| 35 | failCommands: |
| 36 | - insert |
| 37 | errorCode: 64 |
| 38 | errorLabels: |
| 39 | - NoWritesPerformed |
| 40 | - RetryableWriteError |
| 41 | - name: insertOne |
| 42 | object: *collection0 |
| 43 | arguments: |
| 44 | document: |
| 45 | x: 1 |
| 46 | expectError: |
| 47 | errorCode: 64 |
| 48 | errorLabelsContain: |
| 49 | - NoWritesPerformed |
| 50 | - RetryableWriteError |
| 51 | outcome: |
| 52 | - collectionName: *collectionName |
| 53 | databaseName: *databaseName |
| 54 | documents: [] |