diff options
Diffstat (limited to 'jstests/replsets/drop_collections_two_phase_rename_drop_target.js')
-rw-r--r-- | jstests/replsets/drop_collections_two_phase_rename_drop_target.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/jstests/replsets/drop_collections_two_phase_rename_drop_target.js b/jstests/replsets/drop_collections_two_phase_rename_drop_target.js index 9aa9a15c9c1..5191fb47127 100644 --- a/jstests/replsets/drop_collections_two_phase_rename_drop_target.js +++ b/jstests/replsets/drop_collections_two_phase_rename_drop_target.js @@ -52,8 +52,8 @@ let shortIndexName = "short_name"; // In the target collection, which will be dropped, create one index with a "too long" name, and // one with a name of acceptable size. -assert.commandWorked(toColl.createIndex({a: 1}, {name: longIndexName})); -assert.commandWorked(toColl.createIndex({b: 1}, {name: shortIndexName})); +assert.commandWorked(toColl.ensureIndex({a: 1}, {name: longIndexName})); +assert.commandWorked(toColl.ensureIndex({b: 1}, {name: shortIndexName})); // Insert documents into both collections so that we can tell them apart. assert.commandWorked(fromColl.insert({_id: 'from'})); |