summaryrefslogtreecommitdiff
path: root/jstests/core/timeseries/timeseries_show_record_id.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/core/timeseries/timeseries_show_record_id.js')
-rw-r--r--jstests/core/timeseries/timeseries_show_record_id.js10
1 files changed, 3 insertions, 7 deletions
diff --git a/jstests/core/timeseries/timeseries_show_record_id.js b/jstests/core/timeseries/timeseries_show_record_id.js
index 4ac62ad1ccc..81a84d8dd22 100644
--- a/jstests/core/timeseries/timeseries_show_record_id.js
+++ b/jstests/core/timeseries/timeseries_show_record_id.js
@@ -20,16 +20,12 @@ if (!TimeseriesTest.timeseriesCollectionsEnabled(db.getMongo())) {
return;
}
-const testDB = db.getSiblingDB(jsTestName());
-assert.commandWorked(testDB.dropDatabase());
-
const timeFieldName = "time";
-const coll = testDB.getCollection("a");
+const coll = db.timeseries_show_record_id;
coll.drop();
-assert.commandWorked(
- testDB.createCollection(coll.getName(), {timeseries: {timeField: timeFieldName}}));
+assert.commandWorked(db.createCollection(coll.getName(), {timeseries: {timeField: timeFieldName}}));
Random.setRandomSeed();
@@ -62,6 +58,6 @@ const error = assert.throws(() => {
});
assert.commandFailedWithCode(error, ErrorCodes.InvalidPipelineOperator);
-const bucketsColl = testDB.getCollection("system.buckets." + coll.getName());
+const bucketsColl = db.getCollection("system.buckets." + coll.getName());
checkRecordId(bucketsColl.find().showRecordId().toArray());
})();