From 4e28648767281cd2fcf3ced7a68d57e295645d56 Mon Sep 17 00:00:00 2001 From: Tommaso Tocci Date: Thu, 27 Oct 2022 11:51:11 +0000 Subject: SERVER-68782 speedup batched multi delete tests --- jstests/core/timeseries/libs/timeseries_lastpoint_helpers.js | 4 ++-- jstests/core/timeseries/timeseries_large_measurements.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'jstests/core/timeseries') diff --git a/jstests/core/timeseries/libs/timeseries_lastpoint_helpers.js b/jstests/core/timeseries/libs/timeseries_lastpoint_helpers.js index 756317cb3b9..200b257084c 100644 --- a/jstests/core/timeseries/libs/timeseries_lastpoint_helpers.js +++ b/jstests/core/timeseries/libs/timeseries_lastpoint_helpers.js @@ -146,7 +146,7 @@ function createInterestingCollections() { const tsColl = testDB[tsCollName]; const interestingValues = generateInterestingValues(); - assert.commandWorked(tsColl.insertMany(interestingValues)); + assert.commandWorked(tsColl.insertMany(interestingValues, {ordered: false})); // Prepare observer collection. const observerCollName = "observer_in"; @@ -159,7 +159,7 @@ function createInterestingCollections() { // purposes of this test we don't care about the semantic difference between timeseries // collection bucketing and regular collections, only about the accuracy of the lastpoint // rewrite. - assert.commandWorked(observerColl.insertMany(tsColl.find().toArray())); + assert.commandWorked(observerColl.insertMany(tsColl.find().toArray(), {ordered: false})); return [tsColl, observerColl]; } diff --git a/jstests/core/timeseries/timeseries_large_measurements.js b/jstests/core/timeseries/timeseries_large_measurements.js index a0fe365e14a..39e7f7e4b44 100644 --- a/jstests/core/timeseries/timeseries_large_measurements.js +++ b/jstests/core/timeseries/timeseries_large_measurements.js @@ -72,6 +72,6 @@ for (let i = 0; i < numMeasurements; i++) { const doc = {_id: i, [timeFieldName]: ISODate(), value: "a".repeat(measurementValueLength)}; batch.push(doc); } -assert.commandWorked(coll.insertMany(batch)); +assert.commandWorked(coll.insertMany(batch), {ordered: false}); checkAverageBucketSize(); }()); -- cgit v1.2.1