summaryrefslogtreecommitdiff
path: root/jstests/sharding/timeseries_coll_mod.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/sharding/timeseries_coll_mod.js')
-rw-r--r--jstests/sharding/timeseries_coll_mod.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/jstests/sharding/timeseries_coll_mod.js b/jstests/sharding/timeseries_coll_mod.js
index 2627fa21cf4..36b33cb3e04 100644
--- a/jstests/sharding/timeseries_coll_mod.js
+++ b/jstests/sharding/timeseries_coll_mod.js
@@ -68,11 +68,10 @@ function runBasicTest(failPoint) {
key: {[metaField]: 1},
}));
- // Normal collMod commands works for the sharded time-series collection.
- assert.commandWorked(
- db.runCommand({collMod: collName, index: {name: indexName, hidden: true}}));
- assert.commandWorked(
- db.runCommand({collMod: collName, index: {name: indexName, hidden: false}}));
+ // Check that collMod commands works for the sharded time-series collection.
+ assert.commandWorked(db[collName].createIndex({'a': 1}));
+ assert.commandWorked(db.runCommand({collMod: collName, index: {name: 'a_1', hidden: true}}));
+ assert.commandWorked(db.runCommand({collMod: collName, index: {name: 'a_1', hidden: false}}));
if (failPoint) {
// Granularity update disabled for sharded time-series collection, when we're using primary