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