diff options
author | Benety Goh <benety@mongodb.com> | 2021-05-03 15:29:27 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-05-03 19:58:00 +0000 |
commit | 20b86d14a58f5862fa0eeec1f2bfac3161797730 (patch) | |
tree | c495e6d7ab848bae2f983fc70cde891c3948ba16 | |
parent | bede5329d29bce10db1631da4181ffc91c1ff3c1 (diff) | |
download | mongo-20b86d14a58f5862fa0eeec1f2bfac3161797730.tar.gz |
SERVER-56562 sort buckets collection query results by control.min._id in test for more predictable comparison
-rw-r--r-- | jstests/core/timeseries/timeseries_collation.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/jstests/core/timeseries/timeseries_collation.js b/jstests/core/timeseries/timeseries_collation.js index 74a11e377d3..011ec27222c 100644 --- a/jstests/core/timeseries/timeseries_collation.js +++ b/jstests/core/timeseries/timeseries_collation.js @@ -72,7 +72,7 @@ TimeseriesTest.run((insert) => { // Now let's check that min and max appropriately ignore collation for field names, but not // values. - const buckets = bucketsColl.find().toArray(); + const buckets = bucketsColl.find().sort({'control.min._id': 1}).toArray(); jsTestLog('Checking buckets: ' + tojson(buckets)); assert.eq(buckets.length, 3); assert.eq(buckets[0].control.min.x, '10'); @@ -94,4 +94,4 @@ TimeseriesTest.run((insert) => { assert.eq(buckets[2].control.max.x, null); assert.eq(buckets[2].control.max.y, null); }); -})();
\ No newline at end of file +})(); |