| 1 | { |
| 2 | "runOn": [ |
| 3 | { |
| 4 | "minServerVersion": "4.3.1", |
| 5 | "topology": [ |
| 6 | "replicaset", |
| 7 | "sharded", |
| 8 | "load-balanced" |
| 9 | ] |
| 10 | } |
| 11 | ], |
| 12 | "data": [ |
| 13 | { |
| 14 | "_id": 1, |
| 15 | "x": 11 |
| 16 | }, |
| 17 | { |
| 18 | "_id": 2, |
| 19 | "x": 22 |
| 20 | } |
| 21 | ], |
| 22 | "tests": [ |
| 23 | { |
| 24 | "description": "DeleteOne succeeds with RetryableWriteError from server", |
| 25 | "failPoint": { |
| 26 | "configureFailPoint": "failCommand", |
| 27 | "mode": { |
| 28 | "times": 1 |
| 29 | }, |
| 30 | "data": { |
| 31 | "failCommands": [ |
| 32 | "delete" |
| 33 | ], |
| 34 | "errorCode": 112, |
| 35 | "errorLabels": [ |
| 36 | "RetryableWriteError" |
| 37 | ] |
| 38 | } |
| 39 | }, |
| 40 | "operation": { |
| 41 | "name": "deleteOne", |
| 42 | "arguments": { |
| 43 | "filter": { |
| 44 | "_id": 1 |
| 45 | } |
| 46 | } |
| 47 | }, |
| 48 | "outcome": { |
| 49 | "result": { |
| 50 | "deletedCount": 1 |
| 51 | }, |
| 52 | "collection": { |
| 53 | "data": [ |
| 54 | { |
| 55 | "_id": 2, |
| 56 | "x": 22 |
| 57 | } |
| 58 | ] |
| 59 | } |
| 60 | } |
| 61 | }, |
| 62 | { |
| 63 | "description": "DeleteOne fails if server does not return RetryableWriteError", |
| 64 | "failPoint": { |
| 65 | "configureFailPoint": "failCommand", |
| 66 | "mode": { |
| 67 | "times": 1 |
| 68 | }, |
| 69 | "data": { |
| 70 | "failCommands": [ |
| 71 | "delete" |
| 72 | ], |
| 73 | "errorCode": 11600, |
| 74 | "errorLabels": [] |
| 75 | } |
| 76 | }, |
| 77 | "operation": { |
| 78 | "name": "deleteOne", |
| 79 | "arguments": { |
| 80 | "filter": { |
| 81 | "_id": 1 |
| 82 | } |
| 83 | } |
| 84 | }, |
| 85 | "outcome": { |
| 86 | "error": true, |
| 87 | "result": { |
| 88 | "errorLabelsOmit": [ |
| 89 | "RetryableWriteError" |
| 90 | ] |
| 91 | }, |
| 92 | "collection": { |
| 93 | "data": [ |
| 94 | { |
| 95 | "_id": 1, |
| 96 | "x": 11 |
| 97 | }, |
| 98 | { |
| 99 | "_id": 2, |
| 100 | "x": 22 |
| 101 | } |
| 102 | ] |
| 103 | } |
| 104 | } |
| 105 | } |
| 106 | ] |
| 107 | } |