Skip to content

Commit 742199b

Browse files
committed
Revert "test: update read write concern tests"
This reverts commit 0f63cf0.
1 parent c2c165f commit 742199b

8 files changed

+64
-23
lines changed

test/spec/read-write-concern/operation/default-write-concern-2.6.json

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@
4444
"q": {},
4545
"limit": 1
4646
}
47-
]
47+
],
48+
"writeConcern": null
4849
}
4950
}
5051
}
@@ -77,7 +78,8 @@
7778
"q": {},
7879
"limit": 0
7980
}
80-
]
81+
],
82+
"writeConcern": null
8183
}
8284
}
8385
}
@@ -211,7 +213,8 @@
211213
{
212214
"_id": 1
213215
}
214-
]
216+
],
217+
"writeConcern": null
215218
}
216219
}
217220
},
@@ -230,7 +233,8 @@
230233
}
231234
}
232235
}
233-
]
236+
],
237+
"writeConcern": null
234238
}
235239
}
236240
},
@@ -242,7 +246,8 @@
242246
{
243247
"_id": 2
244248
}
245-
]
249+
],
250+
"writeConcern": null
246251
}
247252
}
248253
},
@@ -259,7 +264,8 @@
259264
"x": 2
260265
}
261266
}
262-
]
267+
],
268+
"writeConcern": null
263269
}
264270
}
265271
},
@@ -271,7 +277,8 @@
271277
{
272278
"_id": 3
273279
}
274-
]
280+
],
281+
"writeConcern": null
275282
}
276283
}
277284
},
@@ -291,7 +298,8 @@
291298
},
292299
"multi": true
293300
}
294-
]
301+
],
302+
"writeConcern": null
295303
}
296304
}
297305
},
@@ -306,7 +314,8 @@
306314
},
307315
"limit": 1
308316
}
309-
]
317+
],
318+
"writeConcern": null
310319
}
311320
}
312321
}
@@ -485,7 +494,8 @@
485494
}
486495
}
487496
}
488-
]
497+
],
498+
"writeConcern": null
489499
}
490500
}
491501
},
@@ -505,7 +515,8 @@
505515
},
506516
"multi": true
507517
}
508-
]
518+
],
519+
"writeConcern": null
509520
}
510521
}
511522
},
@@ -522,7 +533,8 @@
522533
"x": 3
523534
}
524535
}
525-
]
536+
],
537+
"writeConcern": null
526538
}
527539
}
528540
}

test/spec/read-write-concern/operation/default-write-concern-2.6.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ tests:
2727
delete: *collection_name
2828
deletes:
2929
- {q: {}, limit: 1}
30+
writeConcern: null
3031
- description: DeleteMany omits default write concern
3132
operations:
3233
- name: deleteMany
@@ -41,6 +42,7 @@ tests:
4142
command:
4243
delete: *collection_name
4344
deletes: [{q: {}, limit: 0}]
45+
writeConcern: null
4446
- description: BulkWrite with all models omits default write concern
4547
operations:
4648
- name: bulkWrite
@@ -93,35 +95,42 @@ tests:
9395
insert: *collection_name
9496
documents:
9597
- {_id: 1}
98+
writeConcern: null
9699
- command_started_event:
97100
command:
98101
update: *collection_name
99102
updates:
100103
- {q: {_id: 1}, u: {$set: {x: 1}}}
104+
writeConcern: null
101105
- command_started_event:
102106
command:
103107
insert: *collection_name
104108
documents:
105109
- {_id: 2}
110+
writeConcern: null
106111
- command_started_event:
107112
command:
108113
update: *collection_name
109114
updates:
110115
- {q: {_id: 1}, u: {x: 2}}
116+
writeConcern: null
111117
- command_started_event:
112118
command:
113119
insert: *collection_name
114120
documents:
115121
- {_id: 3}
122+
writeConcern: null
116123
- command_started_event:
117124
command:
118125
update: *collection_name
119126
updates:
120127
- {q: {_id: 1}, u: {$set: {x: 3}}, multi: true}
128+
writeConcern: null
121129
- command_started_event:
122130
command:
123131
delete: *collection_name
124132
deletes: [{q: {_id: 3}, limit: 1}]
133+
writeConcern: null
125134
- description: 'InsertOne and InsertMany omit default write concern'
126135
operations:
127136
- name: insertOne
@@ -191,13 +200,16 @@ tests:
191200
update: *collection_name
192201
updates:
193202
- {q: {_id: 1}, u: {$set: {x: 1}}}
203+
writeConcern: null
194204
- command_started_event:
195205
command:
196206
update: *collection_name
197207
updates:
198208
- {q: {_id: 2}, u: {$set: {x: 2}}, multi: true}
209+
writeConcern: null
199210
- command_started_event:
200211
command:
201212
update: *collection_name
202213
updates:
203-
- {q: {_id: 2}, u: {x: 3}}
214+
- {q: {_id: 2}, u: {x: 3}}
215+
writeConcern: null

test/spec/read-write-concern/operation/default-write-concern-3.2.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@
8888
"$set": {
8989
"x": 1
9090
}
91-
}
91+
},
92+
"writeConcern": null
9293
}
9394
}
9495
},
@@ -101,7 +102,8 @@
101102
},
102103
"update": {
103104
"x": 2
104-
}
105+
},
106+
"writeConcern": null
105107
}
106108
}
107109
},
@@ -112,7 +114,8 @@
112114
"query": {
113115
"_id": 2
114116
},
115-
"remove": true
117+
"remove": true,
118+
"writeConcern": null
116119
}
117120
}
118121
}

test/spec/read-write-concern/operation/default-write-concern-3.2.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,16 @@ tests:
4343
findAndModify: *collection_name
4444
query: {_id: 1}
4545
update: {$set: {x: 1}}
46+
writeConcern: null
4647
- command_started_event:
4748
command:
4849
findAndModify: *collection_name
4950
query: {_id: 2}
5051
update: {x: 2}
52+
writeConcern: null
5153
- command_started_event:
5254
command:
5355
findAndModify: *collection_name
5456
query: {_id: 2}
55-
remove: true
57+
remove: true
58+
writeConcern: null

test/spec/read-write-concern/operation/default-write-concern-3.4.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@
6969
{
7070
"$out": "other_collection_name"
7171
}
72-
]
72+
],
73+
"writeConcern": null
7374
}
7475
}
7576
}
@@ -108,7 +109,8 @@
108109
"q": {},
109110
"limit": 1
110111
}
111-
]
112+
],
113+
"writeConcern": null
112114
}
113115
}
114116
}
@@ -161,7 +163,8 @@
161163
"command_started_event": {
162164
"command": {
163165
"dropIndexes": "default_write_concern_coll",
164-
"index": "x_1"
166+
"index": "x_1",
167+
"writeConcern": null
165168
}
166169
}
167170
}
@@ -202,7 +205,8 @@
202205
},
203206
"out": {
204207
"inline": 1
205-
}
208+
},
209+
"writeConcern": null
206210
}
207211
}
208212
}

test/spec/read-write-concern/operation/default-write-concern-3.4.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ tests:
3232
command:
3333
aggregate: *collection_name
3434
pipeline: *out_pipeline
35+
writeConcern: null
3536
- description: RunCommand with a write command omits default write concern (runCommand should never inherit write concern)
3637
operations:
3738
- object: database
@@ -49,6 +50,7 @@ tests:
4950
delete: *collection_name
5051
deletes:
5152
- {q: {}, limit: 1}
53+
writeConcern: null
5254
- description: CreateIndex and dropIndex omits default write concern
5355
operations:
5456
- object: collection
@@ -73,6 +75,7 @@ tests:
7375
command:
7476
dropIndexes: *collection_name
7577
index: x_1
78+
writeConcern: null
7679
- description: MapReduce omits default write concern
7780
operations:
7881
- name: mapReduce
@@ -88,4 +91,5 @@ tests:
8891
mapReduce: *collection_name
8992
map: { $code: 'function inc() { return emit(0, this.x + 1) }' }
9093
reduce: { $code: 'function sum(key, values) { return values.reduce((acc, x) => acc + x); }' }
91-
out: { inline: 1 }
94+
out: { inline: 1 }
95+
writeConcern: null

test/spec/read-write-concern/operation/default-write-concern-4.2.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@
6565
"into": "other_collection_name"
6666
}
6767
}
68-
]
68+
],
69+
"writeConcern": null
6970
}
7071
}
7172
}

test/spec/read-write-concern/operation/default-write-concern-4.2.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ tests:
2727
command:
2828
aggregate: *collection_name
2929
pipeline: *merge_pipeline
30+
# "null" fields will be checked for non-existence
31+
writeConcern: null
3032
outcome:
3133
collection:
3234
name: *other_collection_name

0 commit comments

Comments
 (0)