SERVER-98874 Fix flaky underflow test (#30720)

GitOrigin-RevId: a0cc84ed090350d63ca63501a474dbf1efd02d08
This commit is contained in:
Ivan Fefer 2025-01-22 16:16:55 +01:00 committed by MongoDB Bot
parent e8c5dca807
commit b05f8aaecf
1 changed files with 5 additions and 4 deletions

View File

@ -70,10 +70,11 @@ const timeseriesParams = {
granularity: 'seconds',
};
db.createCollection('test', {timeseries: timeseriesParams});
db.test.insert(documentList);
db.dropDatabase();
assert.commandWorked(db.createCollection('test', {timeseries: timeseriesParams}));
assert.commandWorked(db.test.insert(documentList));
// Simply test that the query can be fully executed and does not trigger a tripwire assertion.
let res = db.test.aggregate(pipeline).toArray();
assert(res.length >= 30);
const res = db.test.aggregate(pipeline).toArray();
assert.gte(res.length, 30, tojson(res));
})();