summaryrefslogtreecommitdiff
path: root/jstests/replsets/background_index.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/replsets/background_index.js')
-rw-r--r--jstests/replsets/background_index.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/jstests/replsets/background_index.js b/jstests/replsets/background_index.js
index a09138a9e19..662abef771d 100644
--- a/jstests/replsets/background_index.js
+++ b/jstests/replsets/background_index.js
@@ -23,7 +23,7 @@ for (var i = 0; i < 100; i++) {
}
// Add a background index.
-coll.createIndex({x: 1}, {background: true});
+coll.ensureIndex({x: 1}, {background: true});
// Rename the collection.
assert.commandWorked(