@@ -2,10 +2,6 @@ description: "poc-retryable-writes"
22
33schemaVersion : " 1.0"
44
5- runOnRequirements :
6- - minServerVersion : " 3.6"
7- topologies : [ replicaset ]
8-
95createEntities :
106 - client :
117 id : &client0 client0
@@ -42,6 +38,9 @@ initialData:
4238
4339tests :
4440 - description : " FindOneAndUpdate is committed on first attempt"
41+ runOnRequirements : &onPrimaryTransactionalWrite_requirements
42+ - minServerVersion : " 3.6"
43+ topologies : [ replicaset ]
4544 operations :
4645 - name : failPoint
4746 object : testRunner
6564 - { _id: 2, x: 22 }
6665
6766 - description : " FindOneAndUpdate is not committed on first attempt"
67+ runOnRequirements : *onPrimaryTransactionalWrite_requirements
6868 operations :
6969 - name : failPoint
7070 object : testRunner
8989 - { _id: 2, x: 22 }
9090
9191 - description : " FindOneAndUpdate is never committed"
92+ runOnRequirements : *onPrimaryTransactionalWrite_requirements
9293 operations :
9394 - name : failPoint
9495 object : testRunner
@@ -113,13 +114,9 @@ tests:
113114 - { _id: 2, x: 22 }
114115
115116 - description : " InsertMany succeeds after PrimarySteppedDown"
116- runOnRequirements : &failCommand_requirements
117- - minServerVersion : " 4.0"
118- topologies : [ replicaset ]
119- - minServerVersion : " 4.1.7"
120- # Original test uses "sharded", but retryable writes requires a sharded
121- # cluster backed by replica sets
122- topologies : [ sharded-replicaset ]
117+ runOnRequirements :
118+ - minServerVersion : " 4.3.1" # failCommand errorLabels option
119+ topologies : [ replicaset, sharded ]
123120 operations :
124121 - name : failPoint
125122 object : testRunner
@@ -131,7 +128,7 @@ tests:
131128 data :
132129 failCommands : [ insert ]
133130 errorCode : 189 # PrimarySteppedDown
134- errorLabels : [ RetryableWriteError ]
131+ errorLabels : [ RetryableWriteError ]
135132 - name : insertMany
136133 object : *collection0
137134 arguments :
@@ -153,7 +150,11 @@ tests:
153150 - { _id: 4, x: 44 }
154151
155152 - description : " InsertOne fails after connection failure when retryWrites option is false"
156- runOnRequirements : *failCommand_requirements
153+ runOnRequirements : # failCommand
154+ - minServerVersion : " 4.0"
155+ topologies : [ replicaset ]
156+ - minServerVersion : " 4.1.7"
157+ topologies : [ sharded ]
157158 operations :
158159 - name : failPoint
159160 object : testRunner
@@ -181,7 +182,9 @@ tests:
181182 - { _id: 2, x: 22 }
182183
183184 - description : " InsertOne fails after multiple retryable writeConcernErrors"
184- runOnRequirements : *failCommand_requirements
185+ runOnRequirements :
186+ - minServerVersion : " 4.3.1" # failCommand errorLabels option
187+ topologies : [ replicaset, sharded ]
185188 operations :
186189 - name : failPoint
187190 object : testRunner
@@ -192,6 +195,7 @@ tests:
192195 mode : { times: 2 }
193196 data :
194197 failCommands : [ insert ]
198+ errorLabels : [ RetryableWriteError ]
195199 writeConcernError :
196200 code : 91 # ShutdownInProgress
197201 errmsg : " Replication is being shut down"
0 commit comments