File tree 9 files changed +158
-3
lines changed
test/functional/spec/retryable-writes
9 files changed +158
-3
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ the cluster.
24
24
Server Fail Point
25
25
=================
26
26
27
- The tests depend on a server fail point, ``onPrimaryTransactionalWrite ``, which
27
+ Some tests depend on a server fail point, ``onPrimaryTransactionalWrite ``, which
28
28
allows us to force a network error before the server would return a write result
29
29
to the client. The fail point also allows control whether the server will
30
30
successfully commit the write via its ``failBeforeCommitExceptionCode `` option.
@@ -140,8 +140,8 @@ Each YAML file has the following keys:
140
140
141
141
- ``clientOptions ``: Parameters to pass to MongoClient().
142
142
143
- - ``failPoint ``: The ``configureFailPoint `` command document to run to
144
- configure a fail point on the primary server. Drivers must ensure that
143
+ - ``failPoint `` (optional) : The ``configureFailPoint `` command document to run
144
+ to configure a fail point on the primary server. Drivers must ensure that
145
145
``configureFailPoint `` is the first field in the command.
146
146
147
147
- ``operation ``: Document describing the operation to be executed. The
Original file line number Diff line number Diff line change 71
71
"outcome" : {
72
72
"result" : {
73
73
"deletedCount" : 1 ,
74
+ "insertedCount" : 1 ,
74
75
"insertedIds" : {
75
76
"1" : 3
76
77
},
156
157
"outcome" : {
157
158
"result" : {
158
159
"deletedCount" : 1 ,
160
+ "insertedCount" : 1 ,
159
161
"insertedIds" : {
160
162
"1" : 3
161
163
},
Original file line number Diff line number Diff line change 37
37
outcome :
38
38
result :
39
39
deletedCount : 1
40
+ insertedCount : 1
40
41
insertedIds : { 1: 3 }
41
42
matchedCount : 1
42
43
modifiedCount : 1
79
80
outcome :
80
81
result :
81
82
deletedCount : 1
83
+ insertedCount : 1
82
84
insertedIds : { 1: 3 }
83
85
matchedCount : 1
84
86
modifiedCount : 1
Original file line number Diff line number Diff line change 61
61
"outcome" : {
62
62
"result" : {
63
63
"deletedCount" : 1 ,
64
+ "insertedCount" : 1 ,
64
65
"insertedIds" : {
65
66
"0" : 2
66
67
},
178
179
"outcome" : {
179
180
"result" : {
180
181
"deletedCount" : 1 ,
182
+ "insertedCount" : 3 ,
181
183
"insertedIds" : {
182
184
"0" : 2 ,
183
185
"2" : 3 ,
271
273
"outcome" : {
272
274
"result" : {
273
275
"deletedCount" : 0 ,
276
+ "insertedCount" : 1 ,
274
277
"insertedIds" : {
275
278
"0" : 2
276
279
},
352
355
"outcome" : {
353
356
"result" : {
354
357
"deletedCount" : 0 ,
358
+ "insertedCount" : 1 ,
355
359
"insertedIds" : {
356
360
"0" : 2
357
361
},
416
420
"outcome" : {
417
421
"result" : {
418
422
"deletedCount" : 0 ,
423
+ "insertedCount" : 2 ,
419
424
"insertedIds" : {
420
425
"0" : 2 ,
421
426
"1" : 3
501
506
"error" : true ,
502
507
"result" : {
503
508
"deletedCount" : 0 ,
509
+ "insertedCount" : 0 ,
504
510
"insertedIds" : {},
505
511
"matchedCount" : 0 ,
506
512
"modifiedCount" : 0 ,
575
581
"error" : true ,
576
582
"result" : {
577
583
"deletedCount" : 0 ,
584
+ "insertedCount" : 1 ,
578
585
"insertedIds" : {
579
586
"0" : 2
580
587
},
660
667
"error" : true ,
661
668
"result" : {
662
669
"deletedCount" : 0 ,
670
+ "insertedCount" : 1 ,
663
671
"insertedIds" : {
664
672
"1" : 2
665
673
},
726
734
"outcome" : {
727
735
"result" : {
728
736
"deletedCount" : 1 ,
737
+ "insertedCount" : 1 ,
729
738
"insertedIds" : {
730
739
"1" : 2
731
740
},
793
802
"outcome" : {
794
803
"result" : {
795
804
"deletedCount" : 0 ,
805
+ "insertedCount" : 1 ,
796
806
"insertedIds" : {
797
807
"1" : 2
798
808
},
Original file line number Diff line number Diff line change 32
32
outcome :
33
33
result :
34
34
deletedCount : 1
35
+ insertedCount : 1
35
36
insertedIds : { 0: 2 }
36
37
matchedCount : 1
37
38
modifiedCount : 1
90
91
outcome :
91
92
result :
92
93
deletedCount : 1
94
+ insertedCount : 3
93
95
insertedIds : { 0: 2, 2: 3, 4: 5 }
94
96
matchedCount : 2
95
97
modifiedCount : 2
@@ -130,6 +132,7 @@ tests:
130
132
outcome :
131
133
result :
132
134
deletedCount : 0
135
+ insertedCount : 1
133
136
insertedIds : { 0: 2 }
134
137
matchedCount : 2
135
138
modifiedCount : 2
@@ -168,6 +171,7 @@ tests:
168
171
outcome :
169
172
result :
170
173
deletedCount : 0
174
+ insertedCount : 1
171
175
insertedIds : { 0: 2 }
172
176
matchedCount : 2
173
177
modifiedCount : 2
@@ -200,6 +204,7 @@ tests:
200
204
outcome :
201
205
result :
202
206
deletedCount : 0
207
+ insertedCount : 2
203
208
insertedIds : { 0: 2, 1: 3 }
204
209
matchedCount : 0
205
210
modifiedCount : 0
@@ -240,6 +245,7 @@ tests:
240
245
error : true
241
246
result :
242
247
deletedCount : 0
248
+ insertedCount : 0
243
249
insertedIds : { }
244
250
matchedCount : 0
245
251
modifiedCount : 0
@@ -278,6 +284,7 @@ tests:
278
284
error : true
279
285
result :
280
286
deletedCount : 0
287
+ insertedCount : 1
281
288
insertedIds : { 0: 2 }
282
289
matchedCount : 0
283
290
modifiedCount : 0
@@ -318,6 +325,7 @@ tests:
318
325
error : true
319
326
result :
320
327
deletedCount : 0
328
+ insertedCount : 1
321
329
insertedIds : { 1: 2 }
322
330
matchedCount : 1
323
331
modifiedCount : 1
@@ -355,6 +363,7 @@ tests:
355
363
outcome :
356
364
result :
357
365
deletedCount : 1
366
+ insertedCount : 1
358
367
insertedIds : { 1: 2 }
359
368
matchedCount : 0
360
369
modifiedCount : 0
@@ -392,6 +401,7 @@ tests:
392
401
outcome :
393
402
result :
394
403
deletedCount : 0
404
+ insertedCount : 1
395
405
insertedIds : { 1: 2 }
396
406
matchedCount : 1
397
407
modifiedCount : 1
Original file line number Diff line number Diff line change
1
+ {
2
+ "data" : [
3
+ {
4
+ "_id" : 1 ,
5
+ "x" : 11
6
+ },
7
+ {
8
+ "_id" : 2 ,
9
+ "x" : 22
10
+ }
11
+ ],
12
+ "minServerVersion" : " 3.6" ,
13
+ "tests" : [
14
+ {
15
+ "description" : " DeleteMany ignores retryWrites" ,
16
+ "clientOptions" : {
17
+ "retryWrites" : true
18
+ },
19
+ "operation" : {
20
+ "name" : " deleteMany" ,
21
+ "arguments" : {
22
+ "filter" : {}
23
+ }
24
+ },
25
+ "outcome" : {
26
+ "result" : {
27
+ "deletedCount" : 2
28
+ },
29
+ "collection" : {
30
+ "data" : []
31
+ }
32
+ }
33
+ }
34
+ ]
35
+ }
Original file line number Diff line number Diff line change
1
+ data :
2
+ - { _id: 1, x: 11 }
3
+ - { _id: 2, x: 22 }
4
+
5
+ minServerVersion : ' 3.6'
6
+
7
+ tests :
8
+ -
9
+ description : " DeleteMany ignores retryWrites"
10
+ clientOptions :
11
+ retryWrites : true
12
+ operation :
13
+ name : " deleteMany"
14
+ arguments :
15
+ filter : { }
16
+ outcome :
17
+ result :
18
+ deletedCount : 2
19
+ collection :
20
+ data : []
Original file line number Diff line number Diff line change
1
+ {
2
+ "data" : [
3
+ {
4
+ "_id" : 1 ,
5
+ "x" : 11
6
+ },
7
+ {
8
+ "_id" : 2 ,
9
+ "x" : 22
10
+ }
11
+ ],
12
+ "minServerVersion" : " 3.6" ,
13
+ "tests" : [
14
+ {
15
+ "description" : " UpdateMany ignores retryWrites" ,
16
+ "clientOptions" : {
17
+ "retryWrites" : true
18
+ },
19
+ "operation" : {
20
+ "name" : " updateMany" ,
21
+ "arguments" : {
22
+ "filter" : {},
23
+ "update" : {
24
+ "$inc" : {
25
+ "x" : 1
26
+ }
27
+ }
28
+ }
29
+ },
30
+ "outcome" : {
31
+ "result" : {
32
+ "matchedCount" : 2 ,
33
+ "modifiedCount" : 2 ,
34
+ "upsertedCount" : 0
35
+ },
36
+ "collection" : {
37
+ "data" : [
38
+ {
39
+ "_id" : 1 ,
40
+ "x" : 12
41
+ },
42
+ {
43
+ "_id" : 2 ,
44
+ "x" : 23
45
+ }
46
+ ]
47
+ }
48
+ }
49
+ }
50
+ ]
51
+ }
Original file line number Diff line number Diff line change
1
+ data :
2
+ - { _id: 1, x: 11 }
3
+ - { _id: 2, x: 22 }
4
+
5
+ minServerVersion : ' 3.6'
6
+
7
+ tests :
8
+ -
9
+ description : " UpdateMany ignores retryWrites"
10
+ clientOptions :
11
+ retryWrites : true
12
+ operation :
13
+ name : " updateMany"
14
+ arguments :
15
+ filter : { }
16
+ update : { $inc: { x : 1 }}
17
+ outcome :
18
+ result :
19
+ matchedCount : 2
20
+ modifiedCount : 2
21
+ upsertedCount : 0
22
+ collection :
23
+ data :
24
+ - { _id: 1, x: 12 }
25
+ - { _id: 2, x: 23 }
You can’t perform that action at this time.
0 commit comments