| 1 | { |
| 2 | "description": "retryable-writes insertOne noWritesPerformedErrors", |
| 3 | "schemaVersion": "1.0", |
| 4 | "runOnRequirements": [ |
| 5 | { |
| 6 | "minServerVersion": "6.0", |
| 7 | "topologies": [ |
| 8 | "replicaset" |
| 9 | ] |
| 10 | } |
| 11 | ], |
| 12 | "createEntities": [ |
| 13 | { |
| 14 | "client": { |
| 15 | "id": "client0", |
| 16 | "useMultipleMongoses": false, |
| 17 | "observeEvents": [ |
| 18 | "commandFailedEvent" |
| 19 | ] |
| 20 | } |
| 21 | }, |
| 22 | { |
| 23 | "database": { |
| 24 | "id": "database0", |
| 25 | "client": "client0", |
| 26 | "databaseName": "retryable-writes-tests" |
| 27 | } |
| 28 | }, |
| 29 | { |
| 30 | "collection": { |
| 31 | "id": "collection0", |
| 32 | "database": "database0", |
| 33 | "collectionName": "no-writes-performed-collection" |
| 34 | } |
| 35 | } |
| 36 | ], |
| 37 | "tests": [ |
| 38 | { |
| 39 | "description": "InsertOne fails after NoWritesPerformed error", |
| 40 | "operations": [ |
| 41 | { |
| 42 | "name": "failPoint", |
| 43 | "object": "testRunner", |
| 44 | "arguments": { |
| 45 | "client": "client0", |
| 46 | "failPoint": { |
| 47 | "configureFailPoint": "failCommand", |
| 48 | "mode": { |
| 49 | "times": 2 |
| 50 | }, |
| 51 | "data": { |
| 52 | "failCommands": [ |
| 53 | "insert" |
| 54 | ], |
| 55 | "errorCode": 64, |
| 56 | "errorLabels": [ |
| 57 | "NoWritesPerformed", |
| 58 | "RetryableWriteError" |
| 59 | ] |
| 60 | } |
| 61 | } |
| 62 | } |
| 63 | }, |
| 64 | { |
| 65 | "name": "insertOne", |
| 66 | "object": "collection0", |
| 67 | "arguments": { |
| 68 | "document": { |
| 69 | "x": 1 |
| 70 | } |
| 71 | }, |
| 72 | "expectError": { |
| 73 | "errorCode": 64, |
| 74 | "errorLabelsContain": [ |
| 75 | "NoWritesPerformed", |
| 76 | "RetryableWriteError" |
| 77 | ] |
| 78 | } |
| 79 | } |
| 80 | ], |
| 81 | "outcome": [ |
| 82 | { |
| 83 | "collectionName": "no-writes-performed-collection", |
| 84 | "databaseName": "retryable-writes-tests", |
| 85 | "documents": [] |
| 86 | } |
| 87 | ] |
| 88 | } |
| 89 | ] |
| 90 | } |