1{
2 "data": [
3 {
4 "_id": 1,
5 "x": 11
6 },
7 {
8 "_id": 2,
9 "x": 22
10 }
11 ],
12 "collection_name": "default_write_concern_coll",
13 "database_name": "default_write_concern_db",
14 "runOn": [
15 {
16 "minServerVersion": "2.6"
17 }
18 ],
19 "tests": [
20 {
21 "description": "DeleteOne omits default write concern",
22 "operations": [
23 {
24 "name": "deleteOne",
25 "object": "collection",
26 "collectionOptions": {
27 "writeConcern": {}
28 },
29 "arguments": {
30 "filter": {}
31 },
32 "result": {
33 "deletedCount": 1
34 }
35 }
36 ],
37 "expectations": [
38 {
39 "command_started_event": {
40 "command": {
41 "delete": "default_write_concern_coll",
42 "deletes": [
43 {
44 "q": {},
45 "limit": 1
46 }
47 ],
48 "writeConcern": null
49 }
50 }
51 }
52 ]
53 },
54 {
55 "description": "DeleteMany omits default write concern",
56 "operations": [
57 {
58 "name": "deleteMany",
59 "object": "collection",
60 "collectionOptions": {
61 "writeConcern": {}
62 },
63 "arguments": {
64 "filter": {}
65 },
66 "result": {
67 "deletedCount": 2
68 }
69 }
70 ],
71 "expectations": [
72 {
73 "command_started_event": {
74 "command": {
75 "delete": "default_write_concern_coll",
76 "deletes": [
77 {
78 "q": {},
79 "limit": 0
80 }
81 ],
82 "writeConcern": null
83 }
84 }
85 }
86 ]
87 },
88 {
89 "description": "BulkWrite with all models omits default write concern",
90 "operations": [
91 {
92 "name": "bulkWrite",
93 "object": "collection",
94 "collectionOptions": {
95 "writeConcern": {}
96 },
97 "arguments": {
98 "ordered": true,
99 "requests": [
100 {
101 "name": "deleteMany",
102 "arguments": {
103 "filter": {}
104 }
105 },
106 {
107 "name": "insertOne",
108 "arguments": {
109 "document": {
110 "_id": 1
111 }
112 }
113 },
114 {
115 "name": "updateOne",
116 "arguments": {
117 "filter": {
118 "_id": 1
119 },
120 "update": {
121 "$set": {
122 "x": 1
123 }
124 }
125 }
126 },
127 {
128 "name": "insertOne",
129 "arguments": {
130 "document": {
131 "_id": 2
132 }
133 }
134 },
135 {
136 "name": "replaceOne",
137 "arguments": {
138 "filter": {
139 "_id": 1
140 },
141 "replacement": {
142 "x": 2
143 }
144 }
145 },
146 {
147 "name": "insertOne",
148 "arguments": {
149 "document": {
150 "_id": 3
151 }
152 }
153 },
154 {
155 "name": "updateMany",
156 "arguments": {
157 "filter": {
158 "_id": 1
159 },
160 "update": {
161 "$set": {
162 "x": 3
163 }
164 }
165 }
166 },
167 {
168 "name": "deleteOne",
169 "arguments": {
170 "filter": {
171 "_id": 3
172 }
173 }
174 }
175 ]
176 }
177 }
178 ],
179 "outcome": {
180 "collection": {
181 "name": "default_write_concern_coll",
182 "data": [
183 {
184 "_id": 1,
185 "x": 3
186 },
187 {
188 "_id": 2
189 }
190 ]
191 }
192 },
193 "expectations": [
194 {
195 "command_started_event": {
196 "command": {
197 "delete": "default_write_concern_coll",
198 "deletes": [
199 {
200 "q": {},
201 "limit": 0
202 }
203 ],
204 "writeConcern": null
205 }
206 }
207 },
208 {
209 "command_started_event": {
210 "command": {
211 "insert": "default_write_concern_coll",
212 "documents": [
213 {
214 "_id": 1
215 }
216 ],
217 "writeConcern": null
218 }
219 }
220 },
221 {
222 "command_started_event": {
223 "command": {
224 "update": "default_write_concern_coll",
225 "updates": [
226 {
227 "q": {
228 "_id": 1
229 },
230 "u": {
231 "$set": {
232 "x": 1
233 }
234 }
235 }
236 ],
237 "writeConcern": null
238 }
239 }
240 },
241 {
242 "command_started_event": {
243 "command": {
244 "insert": "default_write_concern_coll",
245 "documents": [
246 {
247 "_id": 2
248 }
249 ],
250 "writeConcern": null
251 }
252 }
253 },
254 {
255 "command_started_event": {
256 "command": {
257 "update": "default_write_concern_coll",
258 "updates": [
259 {
260 "q": {
261 "_id": 1
262 },
263 "u": {
264 "x": 2
265 }
266 }
267 ],
268 "writeConcern": null
269 }
270 }
271 },
272 {
273 "command_started_event": {
274 "command": {
275 "insert": "default_write_concern_coll",
276 "documents": [
277 {
278 "_id": 3
279 }
280 ],
281 "writeConcern": null
282 }
283 }
284 },
285 {
286 "command_started_event": {
287 "command": {
288 "update": "default_write_concern_coll",
289 "updates": [
290 {
291 "q": {
292 "_id": 1
293 },
294 "u": {
295 "$set": {
296 "x": 3
297 }
298 },
299 "multi": true
300 }
301 ],
302 "writeConcern": null
303 }
304 }
305 },
306 {
307 "command_started_event": {
308 "command": {
309 "delete": "default_write_concern_coll",
310 "deletes": [
311 {
312 "q": {
313 "_id": 3
314 },
315 "limit": 1
316 }
317 ],
318 "writeConcern": null
319 }
320 }
321 }
322 ]
323 },
324 {
325 "description": "InsertOne and InsertMany omit default write concern",
326 "operations": [
327 {
328 "name": "insertOne",
329 "object": "collection",
330 "collectionOptions": {
331 "writeConcern": {}
332 },
333 "arguments": {
334 "document": {
335 "_id": 3
336 }
337 }
338 },
339 {
340 "name": "insertMany",
341 "object": "collection",
342 "collectionOptions": {
343 "writeConcern": {}
344 },
345 "arguments": {
346 "documents": [
347 {
348 "_id": 4
349 },
350 {
351 "_id": 5
352 }
353 ]
354 }
355 }
356 ],
357 "outcome": {
358 "collection": {
359 "name": "default_write_concern_coll",
360 "data": [
361 {
362 "_id": 1,
363 "x": 11
364 },
365 {
366 "_id": 2,
367 "x": 22
368 },
369 {
370 "_id": 3
371 },
372 {
373 "_id": 4
374 },
375 {
376 "_id": 5
377 }
378 ]
379 }
380 },
381 "expectations": [
382 {
383 "command_started_event": {
384 "command": {
385 "insert": "default_write_concern_coll",
386 "documents": [
387 {
388 "_id": 3
389 }
390 ],
391 "writeConcern": null
392 }
393 }
394 },
395 {
396 "command_started_event": {
397 "command": {
398 "insert": "default_write_concern_coll",
399 "documents": [
400 {
401 "_id": 4
402 },
403 {
404 "_id": 5
405 }
406 ],
407 "writeConcern": null
408 }
409 }
410 }
411 ]
412 },
413 {
414 "description": "UpdateOne, UpdateMany, and ReplaceOne omit default write concern",
415 "operations": [
416 {
417 "name": "updateOne",
418 "object": "collection",
419 "collectionOptions": {
420 "writeConcern": {}
421 },
422 "arguments": {
423 "filter": {
424 "_id": 1
425 },
426 "update": {
427 "$set": {
428 "x": 1
429 }
430 }
431 }
432 },
433 {
434 "name": "updateMany",
435 "object": "collection",
436 "collectionOptions": {
437 "writeConcern": {}
438 },
439 "arguments": {
440 "filter": {
441 "_id": 2
442 },
443 "update": {
444 "$set": {
445 "x": 2
446 }
447 }
448 }
449 },
450 {
451 "name": "replaceOne",
452 "object": "collection",
453 "collectionOptions": {
454 "writeConcern": {}
455 },
456 "arguments": {
457 "filter": {
458 "_id": 2
459 },
460 "replacement": {
461 "x": 3
462 }
463 }
464 }
465 ],
466 "outcome": {
467 "collection": {
468 "name": "default_write_concern_coll",
469 "data": [
470 {
471 "_id": 1,
472 "x": 1
473 },
474 {
475 "_id": 2,
476 "x": 3
477 }
478 ]
479 }
480 },
481 "expectations": [
482 {
483 "command_started_event": {
484 "command": {
485 "update": "default_write_concern_coll",
486 "updates": [
487 {
488 "q": {
489 "_id": 1
490 },
491 "u": {
492 "$set": {
493 "x": 1
494 }
495 }
496 }
497 ],
498 "writeConcern": null
499 }
500 }
501 },
502 {
503 "command_started_event": {
504 "command": {
505 "update": "default_write_concern_coll",
506 "updates": [
507 {
508 "q": {
509 "_id": 2
510 },
511 "u": {
512 "$set": {
513 "x": 2
514 }
515 },
516 "multi": true
517 }
518 ],
519 "writeConcern": null
520 }
521 }
522 },
523 {
524 "command_started_event": {
525 "command": {
526 "update": "default_write_concern_coll",
527 "updates": [
528 {
529 "q": {
530 "_id": 2
531 },
532 "u": {
533 "x": 3
534 }
535 }
536 ],
537 "writeConcern": null
538 }
539 }
540 }
541 ]
542 }
543 ]
544}
View as plain text