1{
2 "runOn": [
3 {
4 "minServerVersion": "4.0",
5 "topology": [
6 "single",
7 "replicaset"
8 ]
9 },
10 {
11 "minServerVersion": "4.1.7",
12 "topology": [
13 "sharded",
14 "load-balanced"
15 ]
16 }
17 ],
18 "database_name": "retryable-reads-tests",
19 "collection_name": "coll",
20 "data": [],
21 "tests": [
22 {
23 "description": "ListCollectionNames succeeds after InterruptedAtShutdown",
24 "failPoint": {
25 "configureFailPoint": "failCommand",
26 "mode": {
27 "times": 1
28 },
29 "data": {
30 "failCommands": [
31 "listCollections"
32 ],
33 "errorCode": 11600
34 }
35 },
36 "operations": [
37 {
38 "name": "listCollectionNames",
39 "object": "database"
40 }
41 ],
42 "expectations": [
43 {
44 "command_started_event": {
45 "command": {
46 "listCollections": 1
47 }
48 }
49 },
50 {
51 "command_started_event": {
52 "command": {
53 "listCollections": 1
54 }
55 }
56 }
57 ]
58 },
59 {
60 "description": "ListCollectionNames succeeds after InterruptedDueToReplStateChange",
61 "failPoint": {
62 "configureFailPoint": "failCommand",
63 "mode": {
64 "times": 1
65 },
66 "data": {
67 "failCommands": [
68 "listCollections"
69 ],
70 "errorCode": 11602
71 }
72 },
73 "operations": [
74 {
75 "name": "listCollectionNames",
76 "object": "database"
77 }
78 ],
79 "expectations": [
80 {
81 "command_started_event": {
82 "command": {
83 "listCollections": 1
84 }
85 }
86 },
87 {
88 "command_started_event": {
89 "command": {
90 "listCollections": 1
91 }
92 }
93 }
94 ]
95 },
96 {
97 "description": "ListCollectionNames succeeds after NotWritablePrimary",
98 "failPoint": {
99 "configureFailPoint": "failCommand",
100 "mode": {
101 "times": 1
102 },
103 "data": {
104 "failCommands": [
105 "listCollections"
106 ],
107 "errorCode": 10107
108 }
109 },
110 "operations": [
111 {
112 "name": "listCollectionNames",
113 "object": "database"
114 }
115 ],
116 "expectations": [
117 {
118 "command_started_event": {
119 "command": {
120 "listCollections": 1
121 }
122 }
123 },
124 {
125 "command_started_event": {
126 "command": {
127 "listCollections": 1
128 }
129 }
130 }
131 ]
132 },
133 {
134 "description": "ListCollectionNames succeeds after NotPrimaryNoSecondaryOk",
135 "failPoint": {
136 "configureFailPoint": "failCommand",
137 "mode": {
138 "times": 1
139 },
140 "data": {
141 "failCommands": [
142 "listCollections"
143 ],
144 "errorCode": 13435
145 }
146 },
147 "operations": [
148 {
149 "name": "listCollectionNames",
150 "object": "database"
151 }
152 ],
153 "expectations": [
154 {
155 "command_started_event": {
156 "command": {
157 "listCollections": 1
158 }
159 }
160 },
161 {
162 "command_started_event": {
163 "command": {
164 "listCollections": 1
165 }
166 }
167 }
168 ]
169 },
170 {
171 "description": "ListCollectionNames succeeds after NotPrimaryOrSecondary",
172 "failPoint": {
173 "configureFailPoint": "failCommand",
174 "mode": {
175 "times": 1
176 },
177 "data": {
178 "failCommands": [
179 "listCollections"
180 ],
181 "errorCode": 13436
182 }
183 },
184 "operations": [
185 {
186 "name": "listCollectionNames",
187 "object": "database"
188 }
189 ],
190 "expectations": [
191 {
192 "command_started_event": {
193 "command": {
194 "listCollections": 1
195 }
196 }
197 },
198 {
199 "command_started_event": {
200 "command": {
201 "listCollections": 1
202 }
203 }
204 }
205 ]
206 },
207 {
208 "description": "ListCollectionNames succeeds after PrimarySteppedDown",
209 "failPoint": {
210 "configureFailPoint": "failCommand",
211 "mode": {
212 "times": 1
213 },
214 "data": {
215 "failCommands": [
216 "listCollections"
217 ],
218 "errorCode": 189
219 }
220 },
221 "operations": [
222 {
223 "name": "listCollectionNames",
224 "object": "database"
225 }
226 ],
227 "expectations": [
228 {
229 "command_started_event": {
230 "command": {
231 "listCollections": 1
232 }
233 }
234 },
235 {
236 "command_started_event": {
237 "command": {
238 "listCollections": 1
239 }
240 }
241 }
242 ]
243 },
244 {
245 "description": "ListCollectionNames succeeds after ShutdownInProgress",
246 "failPoint": {
247 "configureFailPoint": "failCommand",
248 "mode": {
249 "times": 1
250 },
251 "data": {
252 "failCommands": [
253 "listCollections"
254 ],
255 "errorCode": 91
256 }
257 },
258 "operations": [
259 {
260 "name": "listCollectionNames",
261 "object": "database"
262 }
263 ],
264 "expectations": [
265 {
266 "command_started_event": {
267 "command": {
268 "listCollections": 1
269 }
270 }
271 },
272 {
273 "command_started_event": {
274 "command": {
275 "listCollections": 1
276 }
277 }
278 }
279 ]
280 },
281 {
282 "description": "ListCollectionNames succeeds after HostNotFound",
283 "failPoint": {
284 "configureFailPoint": "failCommand",
285 "mode": {
286 "times": 1
287 },
288 "data": {
289 "failCommands": [
290 "listCollections"
291 ],
292 "errorCode": 7
293 }
294 },
295 "operations": [
296 {
297 "name": "listCollectionNames",
298 "object": "database"
299 }
300 ],
301 "expectations": [
302 {
303 "command_started_event": {
304 "command": {
305 "listCollections": 1
306 }
307 }
308 },
309 {
310 "command_started_event": {
311 "command": {
312 "listCollections": 1
313 }
314 }
315 }
316 ]
317 },
318 {
319 "description": "ListCollectionNames succeeds after HostUnreachable",
320 "failPoint": {
321 "configureFailPoint": "failCommand",
322 "mode": {
323 "times": 1
324 },
325 "data": {
326 "failCommands": [
327 "listCollections"
328 ],
329 "errorCode": 6
330 }
331 },
332 "operations": [
333 {
334 "name": "listCollectionNames",
335 "object": "database"
336 }
337 ],
338 "expectations": [
339 {
340 "command_started_event": {
341 "command": {
342 "listCollections": 1
343 }
344 }
345 },
346 {
347 "command_started_event": {
348 "command": {
349 "listCollections": 1
350 }
351 }
352 }
353 ]
354 },
355 {
356 "description": "ListCollectionNames succeeds after NetworkTimeout",
357 "failPoint": {
358 "configureFailPoint": "failCommand",
359 "mode": {
360 "times": 1
361 },
362 "data": {
363 "failCommands": [
364 "listCollections"
365 ],
366 "errorCode": 89
367 }
368 },
369 "operations": [
370 {
371 "name": "listCollectionNames",
372 "object": "database"
373 }
374 ],
375 "expectations": [
376 {
377 "command_started_event": {
378 "command": {
379 "listCollections": 1
380 }
381 }
382 },
383 {
384 "command_started_event": {
385 "command": {
386 "listCollections": 1
387 }
388 }
389 }
390 ]
391 },
392 {
393 "description": "ListCollectionNames succeeds after SocketException",
394 "failPoint": {
395 "configureFailPoint": "failCommand",
396 "mode": {
397 "times": 1
398 },
399 "data": {
400 "failCommands": [
401 "listCollections"
402 ],
403 "errorCode": 9001
404 }
405 },
406 "operations": [
407 {
408 "name": "listCollectionNames",
409 "object": "database"
410 }
411 ],
412 "expectations": [
413 {
414 "command_started_event": {
415 "command": {
416 "listCollections": 1
417 }
418 }
419 },
420 {
421 "command_started_event": {
422 "command": {
423 "listCollections": 1
424 }
425 }
426 }
427 ]
428 },
429 {
430 "description": "ListCollectionNames fails after two NotWritablePrimary errors",
431 "failPoint": {
432 "configureFailPoint": "failCommand",
433 "mode": {
434 "times": 2
435 },
436 "data": {
437 "failCommands": [
438 "listCollections"
439 ],
440 "errorCode": 10107
441 }
442 },
443 "operations": [
444 {
445 "name": "listCollectionNames",
446 "object": "database",
447 "error": true
448 }
449 ],
450 "expectations": [
451 {
452 "command_started_event": {
453 "command": {
454 "listCollections": 1
455 }
456 }
457 },
458 {
459 "command_started_event": {
460 "command": {
461 "listCollections": 1
462 }
463 }
464 }
465 ]
466 },
467 {
468 "description": "ListCollectionNames fails after NotWritablePrimary when retryReads is false",
469 "clientOptions": {
470 "retryReads": false
471 },
472 "failPoint": {
473 "configureFailPoint": "failCommand",
474 "mode": {
475 "times": 1
476 },
477 "data": {
478 "failCommands": [
479 "listCollections"
480 ],
481 "errorCode": 10107
482 }
483 },
484 "operations": [
485 {
486 "name": "listCollectionNames",
487 "object": "database",
488 "error": true
489 }
490 ],
491 "expectations": [
492 {
493 "command_started_event": {
494 "command": {
495 "listCollections": 1
496 }
497 }
498 }
499 ]
500 }
501 ]
502}
View as plain text