1{
2 "description": "aggregate-out-readConcern",
3 "schemaVersion": "1.4",
4 "runOnRequirements": [
5 {
6 "minServerVersion": "4.1.0",
7 "topologies": [
8 "replicaset",
9 "sharded"
10 ],
11 "serverless": "forbid"
12 }
13 ],
14 "createEntities": [
15 {
16 "client": {
17 "id": "client0",
18 "observeEvents": [
19 "commandStartedEvent"
20 ]
21 }
22 },
23 {
24 "database": {
25 "id": "database0",
26 "client": "client0",
27 "databaseName": "crud-v2"
28 }
29 },
30 {
31 "collection": {
32 "id": "collection0",
33 "database": "database0",
34 "collectionName": "test_aggregate_out_readconcern"
35 }
36 },
37 {
38 "collection": {
39 "id": "collection_readConcern_majority",
40 "database": "database0",
41 "collectionName": "test_aggregate_out_readconcern",
42 "collectionOptions": {
43 "readConcern": {
44 "level": "majority"
45 }
46 }
47 }
48 },
49 {
50 "collection": {
51 "id": "collection_readConcern_local",
52 "database": "database0",
53 "collectionName": "test_aggregate_out_readconcern",
54 "collectionOptions": {
55 "readConcern": {
56 "level": "local"
57 }
58 }
59 }
60 },
61 {
62 "collection": {
63 "id": "collection_readConcern_available",
64 "database": "database0",
65 "collectionName": "test_aggregate_out_readconcern",
66 "collectionOptions": {
67 "readConcern": {
68 "level": "available"
69 }
70 }
71 }
72 },
73 {
74 "collection": {
75 "id": "collection_readConcern_linearizable",
76 "database": "database0",
77 "collectionName": "test_aggregate_out_readconcern",
78 "collectionOptions": {
79 "readConcern": {
80 "level": "linearizable"
81 }
82 }
83 }
84 }
85 ],
86 "initialData": [
87 {
88 "collectionName": "test_aggregate_out_readconcern",
89 "databaseName": "crud-v2",
90 "documents": [
91 {
92 "_id": 1,
93 "x": 11
94 },
95 {
96 "_id": 2,
97 "x": 22
98 },
99 {
100 "_id": 3,
101 "x": 33
102 }
103 ]
104 }
105 ],
106 "tests": [
107 {
108 "description": "readConcern majority with out stage",
109 "operations": [
110 {
111 "object": "collection_readConcern_majority",
112 "name": "aggregate",
113 "arguments": {
114 "pipeline": [
115 {
116 "$sort": {
117 "x": 1
118 }
119 },
120 {
121 "$match": {
122 "_id": {
123 "$gt": 1
124 }
125 }
126 },
127 {
128 "$out": "other_test_collection"
129 }
130 ]
131 }
132 }
133 ],
134 "expectEvents": [
135 {
136 "client": "client0",
137 "events": [
138 {
139 "commandStartedEvent": {
140 "command": {
141 "aggregate": "test_aggregate_out_readconcern",
142 "pipeline": [
143 {
144 "$sort": {
145 "x": 1
146 }
147 },
148 {
149 "$match": {
150 "_id": {
151 "$gt": 1
152 }
153 }
154 },
155 {
156 "$out": "other_test_collection"
157 }
158 ],
159 "readConcern": {
160 "level": "majority"
161 }
162 }
163 }
164 }
165 ]
166 }
167 ],
168 "outcome": [
169 {
170 "collectionName": "other_test_collection",
171 "databaseName": "crud-v2",
172 "documents": [
173 {
174 "_id": 2,
175 "x": 22
176 },
177 {
178 "_id": 3,
179 "x": 33
180 }
181 ]
182 }
183 ]
184 },
185 {
186 "description": "readConcern local with out stage",
187 "operations": [
188 {
189 "object": "collection_readConcern_local",
190 "name": "aggregate",
191 "arguments": {
192 "pipeline": [
193 {
194 "$sort": {
195 "x": 1
196 }
197 },
198 {
199 "$match": {
200 "_id": {
201 "$gt": 1
202 }
203 }
204 },
205 {
206 "$out": "other_test_collection"
207 }
208 ]
209 }
210 }
211 ],
212 "expectEvents": [
213 {
214 "client": "client0",
215 "events": [
216 {
217 "commandStartedEvent": {
218 "command": {
219 "aggregate": "test_aggregate_out_readconcern",
220 "pipeline": [
221 {
222 "$sort": {
223 "x": 1
224 }
225 },
226 {
227 "$match": {
228 "_id": {
229 "$gt": 1
230 }
231 }
232 },
233 {
234 "$out": "other_test_collection"
235 }
236 ],
237 "readConcern": {
238 "level": "local"
239 }
240 }
241 }
242 }
243 ]
244 }
245 ],
246 "outcome": [
247 {
248 "collectionName": "other_test_collection",
249 "databaseName": "crud-v2",
250 "documents": [
251 {
252 "_id": 2,
253 "x": 22
254 },
255 {
256 "_id": 3,
257 "x": 33
258 }
259 ]
260 }
261 ]
262 },
263 {
264 "description": "readConcern available with out stage",
265 "operations": [
266 {
267 "object": "collection_readConcern_available",
268 "name": "aggregate",
269 "arguments": {
270 "pipeline": [
271 {
272 "$sort": {
273 "x": 1
274 }
275 },
276 {
277 "$match": {
278 "_id": {
279 "$gt": 1
280 }
281 }
282 },
283 {
284 "$out": "other_test_collection"
285 }
286 ]
287 }
288 }
289 ],
290 "expectEvents": [
291 {
292 "client": "client0",
293 "events": [
294 {
295 "commandStartedEvent": {
296 "command": {
297 "aggregate": "test_aggregate_out_readconcern",
298 "pipeline": [
299 {
300 "$sort": {
301 "x": 1
302 }
303 },
304 {
305 "$match": {
306 "_id": {
307 "$gt": 1
308 }
309 }
310 },
311 {
312 "$out": "other_test_collection"
313 }
314 ],
315 "readConcern": {
316 "level": "available"
317 }
318 }
319 }
320 }
321 ]
322 }
323 ],
324 "outcome": [
325 {
326 "collectionName": "other_test_collection",
327 "databaseName": "crud-v2",
328 "documents": [
329 {
330 "_id": 2,
331 "x": 22
332 },
333 {
334 "_id": 3,
335 "x": 33
336 }
337 ]
338 }
339 ]
340 },
341 {
342 "description": "readConcern linearizable with out stage",
343 "operations": [
344 {
345 "object": "collection_readConcern_linearizable",
346 "name": "aggregate",
347 "arguments": {
348 "pipeline": [
349 {
350 "$sort": {
351 "x": 1
352 }
353 },
354 {
355 "$match": {
356 "_id": {
357 "$gt": 1
358 }
359 }
360 },
361 {
362 "$out": "other_test_collection"
363 }
364 ]
365 },
366 "expectError": {
367 "isError": true
368 }
369 }
370 ],
371 "expectEvents": [
372 {
373 "client": "client0",
374 "events": [
375 {
376 "commandStartedEvent": {
377 "command": {
378 "aggregate": "test_aggregate_out_readconcern",
379 "pipeline": [
380 {
381 "$sort": {
382 "x": 1
383 }
384 },
385 {
386 "$match": {
387 "_id": {
388 "$gt": 1
389 }
390 }
391 },
392 {
393 "$out": "other_test_collection"
394 }
395 ],
396 "readConcern": {
397 "level": "linearizable"
398 }
399 }
400 }
401 }
402 ]
403 }
404 ]
405 }
406 ]
407}
View as plain text