...
1runOn:
2 -
3 minServerVersion: "4.0"
4 topology: ["replicaset"]
5 -
6 minServerVersion: "4.1.7"
7 topology: ["sharded", "load-balanced"]
8
9data:
10 - { _id: 1, x: 11 }
11
12tests:
13 -
14 description: "InsertMany succeeds after PrimarySteppedDown"
15 failPoint:
16 configureFailPoint: failCommand
17 mode: { times: 1 }
18 data:
19 failCommands: ["insert"]
20 errorCode: 189
21 errorLabels: ["RetryableWriteError"]
22 operation:
23 name: "insertMany"
24 arguments:
25 documents:
26 - { _id: 2, x: 22 }
27 - { _id: 3, x: 33 }
28 options: { ordered: true }
29 outcome:
30 result:
31 insertedIds: { 0: 2, 1: 3 }
32 collection:
33 data:
34 - { _id: 1, x: 11 }
35 - { _id: 2, x: 22 }
36 - { _id: 3, x: 33 }
37 -
38 description: "InsertMany succeeds after WriteConcernError ShutdownInProgress"
39 failPoint:
40 configureFailPoint: failCommand
41 mode: { times: 1 }
42 data:
43 failCommands: ["insert"]
44 writeConcernError:
45 code: 91
46 errmsg: Replication is being shut down
47 errorLabels: ["RetryableWriteError"]
48 operation:
49 name: "insertMany"
50 arguments:
51 documents:
52 - { _id: 2, x: 22 }
53 - { _id: 3, x: 33 }
54 options: { ordered: true }
55 outcome:
56 result:
57 insertedIds: { 0: 2, 1: 3 }
58 collection:
59 data:
60 - { _id: 1, x: 11 }
61 - { _id: 2, x: 22 }
62 - { _id: 3, x: 33 }
63 -
64 description: "InsertMany fails with a RetryableWriteError label after two connection failures"
65 failPoint:
66 configureFailPoint: failCommand
67 mode: { times: 2 }
68 data:
69 failCommands: ["insert"]
70 closeConnection: true
71 operation:
72 name: "insertMany"
73 arguments:
74 documents:
75 - { _id: 2, x: 22 }
76 - { _id: 3, x: 33 }
77 options: { ordered: true }
78 outcome:
79 error: true
80 result:
81 errorLabelsContain: ["RetryableWriteError"]
82 collection:
83 data:
84 - { _id: 1, x: 11 }
View as plain text