diff options
Diffstat (limited to 'jstests/core/index_diag.js')
-rw-r--r-- | jstests/core/index_diag.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/jstests/core/index_diag.js b/jstests/core/index_diag.js index 86f90c8d15c..b336e5cc141 100644 --- a/jstests/core/index_diag.js +++ b/jstests/core/index_diag.js @@ -49,7 +49,7 @@ if (FixtureHelpers.numberOfShardsForCollection(t) === 1) { assert.commandWorked(t.createIndex({_id: 1, x: 1})); assert.eq(all, t.find().hint({_id: 1, x: 1}).returnKey().toArray()); } -assert.commandWorked(t.createIndex({_id: 1, x: 1})); +assert.commandWorked(t.ensureIndex({_id: 1, x: 1})); assert.eq(r(all), t.find().hint({_id: 1, x: 1}).sort({x: 1}).returnKey().toArray()); assert.eq([{}, {}, {}], t.find().hint({$natural: 1}).returnKey().toArray()); |