...
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": "FindOneAndDelete succeeds with RetryableWriteError from server",
25 "failPoint": {
26 "configureFailPoint": "failCommand",
27 "mode": {
28 "times": 1
29 },
30 "data": {
31 "failCommands": [
32 "findAndModify"
33 ],
34 "errorCode": 112,
35 "errorLabels": [
36 "RetryableWriteError"
37 ]
38 }
39 },
40 "operation": {
41 "name": "findOneAndDelete",
42 "arguments": {
43 "filter": {
44 "x": {
45 "$gte": 11
46 }
47 },
48 "sort": {
49 "x": 1
50 }
51 }
52 },
53 "outcome": {
54 "result": {
55 "_id": 1,
56 "x": 11
57 },
58 "collection": {
59 "data": [
60 {
61 "_id": 2,
62 "x": 22
63 }
64 ]
65 }
66 }
67 },
68 {
69 "description": "FindOneAndDelete fails if server does not return RetryableWriteError",
70 "failPoint": {
71 "configureFailPoint": "failCommand",
72 "mode": {
73 "times": 1
74 },
75 "data": {
76 "failCommands": [
77 "findAndModify"
78 ],
79 "errorCode": 11600,
80 "errorLabels": []
81 }
82 },
83 "operation": {
84 "name": "findOneAndDelete",
85 "arguments": {
86 "filter": {
87 "x": {
88 "$gte": 11
89 }
90 },
91 "sort": {
92 "x": 1
93 }
94 }
95 },
96 "outcome": {
97 "error": true,
98 "result": {
99 "errorLabelsOmit": [
100 "RetryableWriteError"
101 ]
102 },
103 "collection": {
104 "data": [
105 {
106 "_id": 1,
107 "x": 11
108 },
109 {
110 "_id": 2,
111 "x": 22
112 }
113 ]
114 }
115 }
116 }
117 ]
118}
View as plain text