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