diff options
Diffstat (limited to 'jstests/noPassthroughWithMongod/indexbg_drop.js')
-rw-r--r-- | jstests/noPassthroughWithMongod/indexbg_drop.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/jstests/noPassthroughWithMongod/indexbg_drop.js b/jstests/noPassthroughWithMongod/indexbg_drop.js index 73446736d84..1739d89054a 100644 --- a/jstests/noPassthroughWithMongod/indexbg_drop.js +++ b/jstests/noPassthroughWithMongod/indexbg_drop.js @@ -45,9 +45,11 @@ var dc = {dropIndexes: collection, index: "i_1"}; // set up collections masterDB.dropDatabase(); jsTest.log("creating test data " + size + " documents"); +var bulk = masterDB.getCollection(collection).initializeUnorderedBulkOp(); for( i = 0; i < size; ++i ) { - masterDB.getCollection(collection).save( {i: Random.rand()} ); + bulk.insert({ i: Random.rand() }); } +assert.writeOK(bulk.execute()); jsTest.log("Starting background indexing for test of: " + tojson(dc)); // Add another index to be sure the drop command works. |