diff options
author | Randolph Tan <randolph@10gen.com> | 2014-04-25 14:04:36 -0400 |
---|---|---|
committer | Randolph Tan <randolph@10gen.com> | 2014-05-06 16:32:44 -0400 |
commit | 87dc3ae516e1d12a632dc604710661e38ed7b3dd (patch) | |
tree | 3a483a3d0c38ce00a7f4d7dba0e9cba7f7eba5f3 /jstests/noPassthroughWithMongod/indexbg_interrupts.js | |
parent | 6b945ec15c61f6bd4bfbaf382624d886ec8441d2 (diff) | |
download | mongo-87dc3ae516e1d12a632dc604710661e38ed7b3dd.tar.gz |
SERVER-13741 Migrate remaining tests to use write commands
Diffstat (limited to 'jstests/noPassthroughWithMongod/indexbg_interrupts.js')
-rw-r--r-- | jstests/noPassthroughWithMongod/indexbg_interrupts.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/jstests/noPassthroughWithMongod/indexbg_interrupts.js b/jstests/noPassthroughWithMongod/indexbg_interrupts.js index 09c75056ca2..f6f1d426161 100644 --- a/jstests/noPassthroughWithMongod/indexbg_interrupts.js +++ b/jstests/noPassthroughWithMongod/indexbg_interrupts.js @@ -66,9 +66,11 @@ for (var idx = 0; idx < dropAction.length; idx++) { // set up collections masterDB.dropDatabase(); jsTest.log("creating test data " + size + " documents"); + var bulk = masterDB.getCollection(collection).initializeUnorderedBulkOp(); for(var i = 0; i < size; ++i ) { - masterDB.getCollection(collection).save( {i:i} ); + bulk.insert({ i: i }); } + assert.writeOK(bulk.execute()); jsTest.log("Starting background indexing for test of: " + JSON.stringify(dc)); masterDB.getCollection(collection).ensureIndex( {i:1}, {background:true} ); |