Skip to content

Commit 36e12cf

Browse files
author
Justin Lee
committed
use a fixed, simpler distribution for a more stable test
1 parent 5704a4d commit 36e12cf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

driver-core/src/test/functional/com/mongodb/client/model/AggregatesFunctionalSpecification.groovy

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -450,18 +450,18 @@ class AggregatesFunctionalSpecification extends OperationFunctionalSpecification
450450
helper.drop()
451451

452452
def random = new SecureRandom()
453-
(1..2000).each {
454-
def document = new Document('price', random.nextDouble() * 5000D + 5.01D)
453+
(0..2000).each {
454+
def document = new Document('price', it * 5.01D)
455455
helper.insertDocuments(document)
456456
}
457457

458458
when:
459459
def results = helper.aggregate([bucketAuto('$price', 10, new BucketAutoOptions()
460-
.granularity(BucketGranularity.E6)
460+
.granularity(BucketGranularity.POWERSOF2)
461461
.output(sum('count', 1), avg('avgPrice', '$price')))])
462462

463463
then:
464-
results.size() == 6
464+
results.size() == 5
465465
results[0].count != null
466466
results[0].avgPrice != null
467467

0 commit comments

Comments
 (0)