Skip to content

Commit 3672e3f

Browse files
committed
Updated unified crud test
JAVA-4547 JAVA-4548
1 parent 48bcca2 commit 3672e3f

11 files changed

+52
-48
lines changed

driver-core/src/test/resources/unified-test-format/crud/aggregate.json

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -330,11 +330,7 @@
330330
"description": "aggregate with comment sets comment on getMore",
331331
"runOnRequirements": [
332332
{
333-
"minServerVersion": "4.4.0",
334-
"topologies": [
335-
"single",
336-
"replicaset"
337-
]
333+
"minServerVersion": "4.4.0"
338334
}
339335
],
340336
"operations": [
@@ -351,7 +347,9 @@
351347
}
352348
],
353349
"batchSize": 2,
354-
"comment": "comment"
350+
"comment": {
351+
"content": "test"
352+
}
355353
},
356354
"object": "collection0",
357355
"expectResult": [
@@ -398,7 +396,9 @@
398396
"cursor": {
399397
"batchSize": 2
400398
},
401-
"comment": "comment"
399+
"comment": {
400+
"content": "test"
401+
}
402402
},
403403
"commandName": "aggregate",
404404
"databaseName": "aggregate-tests"
@@ -415,7 +415,9 @@
415415
},
416416
"collection": "coll0",
417417
"batchSize": 2,
418-
"comment": "comment"
418+
"comment": {
419+
"content": "test"
420+
}
419421
},
420422
"commandName": "getMore",
421423
"databaseName": "aggregate-tests"
@@ -432,7 +434,9 @@
432434
},
433435
"collection": "coll0",
434436
"batchSize": 2,
435-
"comment": "comment"
437+
"comment": {
438+
"content": "test"
439+
}
436440
},
437441
"commandName": "getMore",
438442
"databaseName": "aggregate-tests"
@@ -443,15 +447,11 @@
443447
]
444448
},
445449
{
446-
"description": "aggregate with comment sets comment on getMore - pre 4.4",
450+
"description": "aggregate with comment does not set comment on getMore - pre 4.4",
447451
"runOnRequirements": [
448452
{
449453
"minServerVersion": "3.6.0",
450-
"maxServerVersion": "4.4.0",
451-
"topologies": [
452-
"single",
453-
"replicaset"
454-
]
454+
"maxServerVersion": "4.3.99"
455455
}
456456
],
457457
"operations": [
@@ -531,7 +531,10 @@
531531
]
532532
},
533533
"collection": "coll0",
534-
"batchSize": 2
534+
"batchSize": 2,
535+
"comment": {
536+
"$$exists": false
537+
}
535538
},
536539
"commandName": "getMore",
537540
"databaseName": "aggregate-tests"
@@ -547,7 +550,10 @@
547550
]
548551
},
549552
"collection": "coll0",
550-
"batchSize": 2
553+
"batchSize": 2,
554+
"comment": {
555+
"$$exists": false
556+
}
551557
},
552558
"commandName": "getMore",
553559
"databaseName": "aggregate-tests"

driver-core/src/test/resources/unified-test-format/crud/bulkWrite-comment.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,6 @@
414414
"description": "BulkWrite with comment - pre 4.4",
415415
"runOnRequirements": [
416416
{
417-
"minServerVersion": "3.6.0",
418417
"maxServerVersion": "4.2.99"
419418
}
420419
],

driver-core/src/test/resources/unified-test-format/crud/deleteMany-comment.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@
175175
"description": "deleteMany with comment - pre 4.4",
176176
"runOnRequirements": [
177177
{
178-
"minServerVersion": "3.6.0",
179178
"maxServerVersion": "4.2.99"
180179
}
181180
],

driver-core/src/test/resources/unified-test-format/crud/deleteOne-comment.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@
177177
"description": "deleteOne with comment - pre 4.4",
178178
"runOnRequirements": [
179179
{
180-
"minServerVersion": "3.6.0",
181180
"maxServerVersion": "4.2.99"
182181
}
183182
],

driver-core/src/test/resources/unified-test-format/crud/find-comment.json

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
},
7878
"expectResult": [
7979
{
80-
"_id": 1, "x": 11
80+
"_id": 1
8181
}
8282
]
8383
}
@@ -195,15 +195,10 @@
195195
]
196196
},
197197
{
198-
"description": "find with comment sets comment on getMore - pre 4.4",
198+
"description": "find with comment sets comment on getMore",
199199
"runOnRequirements": [
200200
{
201-
"minServerVersion": "3.6.0",
202-
"maxServerVersion": "4.4.0",
203-
"topologies": [
204-
"single",
205-
"replicaset"
206-
]
201+
"minServerVersion": "4.4.0"
207202
}
208203
],
209204
"operations": [
@@ -217,7 +212,9 @@
217212
}
218213
},
219214
"batchSize": 2,
220-
"comment": "comment"
215+
"comment": {
216+
"key": "value"
217+
}
221218
},
222219
"expectResult": [
223220
{
@@ -257,7 +254,9 @@
257254
}
258255
},
259256
"batchSize": 2,
260-
"comment": "comment"
257+
"comment": {
258+
"key": "value"
259+
}
261260
}
262261
}
263262
},
@@ -271,7 +270,10 @@
271270
]
272271
},
273272
"collection": "coll0",
274-
"batchSize": 2
273+
"batchSize": 2,
274+
"comment": {
275+
"key": "value"
276+
}
275277
}
276278
}
277279
},
@@ -285,7 +287,10 @@
285287
]
286288
},
287289
"collection": "coll0",
288-
"batchSize": 2
290+
"batchSize": 2,
291+
"comment": {
292+
"key": "value"
293+
}
289294
}
290295
}
291296
}
@@ -294,14 +299,11 @@
294299
]
295300
},
296301
{
297-
"description": "find with comment sets comment on getMore",
302+
"description": "find with comment does not set comment on getMore - pre 4.4",
298303
"runOnRequirements": [
299304
{
300-
"minServerVersion": "4.4.0",
301-
"topologies": [
302-
"single",
303-
"replicaset"
304-
]
305+
"minServerVersion": "3.6.0",
306+
"maxServerVersion": "4.3.99"
305307
}
306308
],
307309
"operations": [
@@ -370,7 +372,9 @@
370372
},
371373
"collection": "coll0",
372374
"batchSize": 2,
373-
"comment": "comment"
375+
"comment": {
376+
"$$exists": false
377+
}
374378
}
375379
}
376380
},
@@ -385,7 +389,9 @@
385389
},
386390
"collection": "coll0",
387391
"batchSize": 2,
388-
"comment": "comment"
392+
"comment": {
393+
"$$exists": false
394+
}
389395
}
390396
}
391397
}

driver-core/src/test/resources/unified-test-format/crud/findOneAndReplace-hint-unacknowledged.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,9 @@
146146
},
147147
"hint": "_id_"
148148
},
149-
"expectResult": {
150-
"$$unsetOrMatches": null
151-
}
149+
"expectResult": {
150+
"$$unsetOrMatches": null
151+
}
152152
}
153153
],
154154
"expectEvents": [

driver-core/src/test/resources/unified-test-format/crud/insertMany-comment.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@
166166
"description": "insertMany with comment - pre 4.4",
167167
"runOnRequirements": [
168168
{
169-
"minServerVersion": "3.6.0",
170169
"maxServerVersion": "4.2.99"
171170
}
172171
],

driver-core/src/test/resources/unified-test-format/crud/insertOne-comment.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@
162162
"description": "insertOne with comment - pre 4.4",
163163
"runOnRequirements": [
164164
{
165-
"minServerVersion": "3.6.0",
166165
"maxServerVersion": "4.2.99"
167166
}
168167
],

driver-core/src/test/resources/unified-test-format/crud/replaceOne-comment.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@
166166
"description": "ReplaceOne with comment - pre 4.4",
167167
"runOnRequirements": [
168168
{
169-
"minServerVersion": "3.6.0",
170169
"maxServerVersion": "4.2.99"
171170
}
172171
],

driver-core/src/test/resources/unified-test-format/crud/updateMany-comment.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@
176176
"description": "UpdateMany with comment - pre 4.4",
177177
"runOnRequirements": [
178178
{
179-
"minServerVersion": "3.6.0",
180179
"maxServerVersion": "4.2.99"
181180
}
182181
],

0 commit comments

Comments
 (0)