summaryrefslogtreecommitdiff
path: root/jstests/noPassthrough/ttl_hidden_index.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/noPassthrough/ttl_hidden_index.js')
-rw-r--r--jstests/noPassthrough/ttl_hidden_index.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/jstests/noPassthrough/ttl_hidden_index.js b/jstests/noPassthrough/ttl_hidden_index.js
index b64f4822638..80c783dad33 100644
--- a/jstests/noPassthrough/ttl_hidden_index.js
+++ b/jstests/noPassthrough/ttl_hidden_index.js
@@ -6,7 +6,7 @@ let coll = runner.getDB("test").ttl_hiddenl_index;
coll.drop();
// Create TTL index.
-assert.commandWorked(coll.createIndex({x: 1}, {expireAfterSeconds: 0}));
+assert.commandWorked(coll.ensureIndex({x: 1}, {expireAfterSeconds: 0}));
let now = new Date();
assert.commandWorked(coll.hideIndex("x_1"));