Skip to content

Commit 1b77123

Browse files
committed
Sync with latest retryable write JSON driven tests.
1 parent 8210b5a commit 1b77123

File tree

4 files changed

+242
-8
lines changed

4 files changed

+242
-8
lines changed

tests/MongoDB.Driver.Tests.Dotnet/Specifications/retryable-writes/tests/retryableErrors.json

Lines changed: 79 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,22 @@
99
"x": 22
1010
}
1111
],
12-
"minServerVersion": "3.7.9-224-gc23aaecb55",
12+
"minServerVersion": "4.1.0",
1313
"tests": [
1414
{
1515
"description": "InsertOne succeeds after connection failure",
16+
"clientOptions": {
17+
"retryWrites": true
18+
},
1619
"failPoint": {
1720
"configureFailPoint": "failCommand",
1821
"mode": {
1922
"times": 1
2023
},
2124
"data": {
25+
"failCommands": [
26+
"insert"
27+
],
2228
"closeConnection": true
2329
}
2430
},
@@ -55,12 +61,18 @@
5561
},
5662
{
5763
"description": "InsertOne succeeds after NotMaster",
64+
"clientOptions": {
65+
"retryWrites": true
66+
},
5867
"failPoint": {
5968
"configureFailPoint": "failCommand",
6069
"mode": {
6170
"times": 1
6271
},
6372
"data": {
73+
"failCommands": [
74+
"insert"
75+
],
6476
"errorCode": 10107,
6577
"closeConnection": false
6678
}
@@ -98,12 +110,18 @@
98110
},
99111
{
100112
"description": "InsertOne succeeds after NotMasterOrSecondary",
113+
"clientOptions": {
114+
"retryWrites": true
115+
},
101116
"failPoint": {
102117
"configureFailPoint": "failCommand",
103118
"mode": {
104119
"times": 1
105120
},
106121
"data": {
122+
"failCommands": [
123+
"insert"
124+
],
107125
"errorCode": 13436,
108126
"closeConnection": false
109127
}
@@ -141,12 +159,18 @@
141159
},
142160
{
143161
"description": "InsertOne succeeds after NotMasterNoSlaveOk",
162+
"clientOptions": {
163+
"retryWrites": true
164+
},
144165
"failPoint": {
145166
"configureFailPoint": "failCommand",
146167
"mode": {
147168
"times": 1
148169
},
149170
"data": {
171+
"failCommands": [
172+
"insert"
173+
],
150174
"errorCode": 13435,
151175
"closeConnection": false
152176
}
@@ -184,12 +208,18 @@
184208
},
185209
{
186210
"description": "InsertOne succeeds after InterruptedDueToReplStateChange",
211+
"clientOptions": {
212+
"retryWrites": true
213+
},
187214
"failPoint": {
188215
"configureFailPoint": "failCommand",
189216
"mode": {
190217
"times": 1
191218
},
192219
"data": {
220+
"failCommands": [
221+
"insert"
222+
],
193223
"errorCode": 11602,
194224
"closeConnection": false
195225
}
@@ -227,12 +257,18 @@
227257
},
228258
{
229259
"description": "InsertOne succeeds after InterruptedAtShutdown",
260+
"clientOptions": {
261+
"retryWrites": true
262+
},
230263
"failPoint": {
231264
"configureFailPoint": "failCommand",
232265
"mode": {
233266
"times": 1
234267
},
235268
"data": {
269+
"failCommands": [
270+
"insert"
271+
],
236272
"errorCode": 11600,
237273
"closeConnection": false
238274
}
@@ -270,12 +306,18 @@
270306
},
271307
{
272308
"description": "InsertOne succeeds after PrimarySteppedDown",
309+
"clientOptions": {
310+
"retryWrites": true
311+
},
273312
"failPoint": {
274313
"configureFailPoint": "failCommand",
275314
"mode": {
276315
"times": 1
277316
},
278317
"data": {
318+
"failCommands": [
319+
"insert"
320+
],
279321
"errorCode": 189,
280322
"closeConnection": false
281323
}
@@ -313,12 +355,18 @@
313355
},
314356
{
315357
"description": "InsertOne succeeds after ShutdownInProgress",
358+
"clientOptions": {
359+
"retryWrites": true
360+
},
316361
"failPoint": {
317362
"configureFailPoint": "failCommand",
318363
"mode": {
319364
"times": 1
320365
},
321366
"data": {
367+
"failCommands": [
368+
"insert"
369+
],
322370
"errorCode": 91,
323371
"closeConnection": false
324372
}
@@ -356,12 +404,18 @@
356404
},
357405
{
358406
"description": "InsertOne succeeds after HostNotFound",
407+
"clientOptions": {
408+
"retryWrites": true
409+
},
359410
"failPoint": {
360411
"configureFailPoint": "failCommand",
361412
"mode": {
362413
"times": 1
363414
},
364415
"data": {
416+
"failCommands": [
417+
"insert"
418+
],
365419
"errorCode": 7,
366420
"closeConnection": false
367421
}
@@ -399,12 +453,18 @@
399453
},
400454
{
401455
"description": "InsertOne succeeds after HostUnreachable",
456+
"clientOptions": {
457+
"retryWrites": true
458+
},
402459
"failPoint": {
403460
"configureFailPoint": "failCommand",
404461
"mode": {
405462
"times": 1
406463
},
407464
"data": {
465+
"failCommands": [
466+
"insert"
467+
],
408468
"errorCode": 6,
409469
"closeConnection": false
410470
}
@@ -442,12 +502,18 @@
442502
},
443503
{
444504
"description": "InsertOne succeeds after SocketException",
505+
"clientOptions": {
506+
"retryWrites": true
507+
},
445508
"failPoint": {
446509
"configureFailPoint": "failCommand",
447510
"mode": {
448511
"times": 1
449512
},
450513
"data": {
514+
"failCommands": [
515+
"insert"
516+
],
451517
"errorCode": 9001,
452518
"closeConnection": false
453519
}
@@ -485,12 +551,18 @@
485551
},
486552
{
487553
"description": "InsertOne succeeds after NetworkTimeout",
554+
"clientOptions": {
555+
"retryWrites": true
556+
},
488557
"failPoint": {
489558
"configureFailPoint": "failCommand",
490559
"mode": {
491560
"times": 1
492561
},
493562
"data": {
563+
"failCommands": [
564+
"insert"
565+
],
494566
"errorCode": 89,
495567
"closeConnection": false
496568
}
@@ -528,12 +600,18 @@
528600
},
529601
{
530602
"description": "InsertOne fails after Interrupted",
603+
"clientOptions": {
604+
"retryWrites": true
605+
},
531606
"failPoint": {
532607
"configureFailPoint": "failCommand",
533608
"mode": {
534609
"times": 1
535610
},
536611
"data": {
612+
"failCommands": [
613+
"insert"
614+
],
537615
"errorCode": 11601,
538616
"closeConnection": false
539617
}

0 commit comments

Comments
 (0)