@@ -364,6 +364,7 @@ class DBCollectionFunctionalSpecification extends FunctionalSpecification {
364
364
collection. save(~[' x' : ' c' ]);
365
365
}
366
366
367
+ @IgnoreIf ({ serverVersionAtLeast(4 , 1 ) })
367
368
def ' should group by the x field and apply the provided count function' () {
368
369
given :
369
370
insertDataForGroupTests()
@@ -379,6 +380,7 @@ class DBCollectionFunctionalSpecification extends FunctionalSpecification {
379
380
that result, contains(~[' x' : ' a' , ' count' : 3.0D ], ~[' x' : ' b' , ' count' : 4.0D ], ~[' x' : ' c' , ' count' : 1.0D ]);
380
381
}
381
382
383
+ @IgnoreIf ({ serverVersionAtLeast(4 , 1 ) })
382
384
def ' should group by the x field and apply the provided count function using a GroupCommand' () {
383
385
given :
384
386
insertDataForGroupTests()
@@ -397,6 +399,7 @@ class DBCollectionFunctionalSpecification extends FunctionalSpecification {
397
399
that result, contains(~[' x' : ' a' , ' count' : 3.0D ], ~[' x' : ' b' , ' count' : 4.0D ], ~[' x' : ' c' , ' count' : 1.0D ]);
398
400
}
399
401
402
+ @IgnoreIf ({ serverVersionAtLeast(4 , 1 ) })
400
403
def ' should group using a key function in a GroupCommand' () {
401
404
given :
402
405
insertDataForGroupTests()
@@ -415,6 +418,7 @@ class DBCollectionFunctionalSpecification extends FunctionalSpecification {
415
418
that result, contains(~[' x' : ' a' , ' count' : 3.0D ], ~[' x' : ' b' , ' count' : 4.0D ], ~[' x' : ' c' , ' count' : 1.0D ]);
416
419
}
417
420
421
+ @IgnoreIf ({ serverVersionAtLeast(4 , 1 ) })
418
422
def ' should group and count only those documents that fulfull the given condition' () {
419
423
given :
420
424
insertDataForGroupTests()
@@ -430,6 +434,7 @@ class DBCollectionFunctionalSpecification extends FunctionalSpecification {
430
434
that result, contains(~[' x' : ' b' , ' count' : 4.0D ]);
431
435
}
432
436
437
+ @IgnoreIf ({ serverVersionAtLeast(4 , 1 ) })
433
438
def ' should be able to set a value in the results' () {
434
439
given :
435
440
insertDataForGroupTests()
@@ -445,6 +450,7 @@ class DBCollectionFunctionalSpecification extends FunctionalSpecification {
445
450
that result, contains(~[' x' : ' c' , ' valueFound' : true ]);
446
451
}
447
452
453
+ @IgnoreIf ({ serverVersionAtLeast(4 , 1 ) })
448
454
def ' should return results set by the function, based on condition supplied without key' () {
449
455
given :
450
456
insertDataForGroupTests()
@@ -460,6 +466,7 @@ class DBCollectionFunctionalSpecification extends FunctionalSpecification {
460
466
that result, contains(~[' valueFound' : true ]);
461
467
}
462
468
469
+ @IgnoreIf ({ serverVersionAtLeast(4 , 1 ) })
463
470
def ' finalize function should replace the whole result document if a document is the return type of finalize function' () {
464
471
given :
465
472
insertDataForGroupTests()
@@ -476,6 +483,7 @@ class DBCollectionFunctionalSpecification extends FunctionalSpecification {
476
483
that result, contains(~[' a' : 1.0D ]);
477
484
}
478
485
486
+ @IgnoreIf ({ serverVersionAtLeast(4 , 1 ) })
479
487
def ' finalize function should modify the result document' () {
480
488
given :
481
489
insertDataForGroupTests()
@@ -492,6 +500,7 @@ class DBCollectionFunctionalSpecification extends FunctionalSpecification {
492
500
that result, contains(~[' x' : ' b' , ' valueFound' : true , ' a' : 1.0D ]);
493
501
}
494
502
503
+ @IgnoreIf ({ serverVersionAtLeast(4 , 1 ) })
495
504
def ' should throw an Exception if no initial document provided' () {
496
505
when :
497
506
collection. group(~[' x' : 1 ],
@@ -503,6 +512,7 @@ class DBCollectionFunctionalSpecification extends FunctionalSpecification {
503
512
thrown(IllegalArgumentException )
504
513
}
505
514
515
+ @IgnoreIf ({ serverVersionAtLeast(4 , 1 ) })
506
516
def ' should throw an Exception if no reduce function provided' () {
507
517
when :
508
518
collection. group(~[' x' : 1 ],
0 commit comments