diff options
author | Randolph Tan <randolph@10gen.com> | 2014-05-14 14:11:11 -0400 |
---|---|---|
committer | Randolph Tan <randolph@10gen.com> | 2014-05-15 14:04:11 -0400 |
commit | 0dabee8227d445a18fa5e8e49b2be60ba2a0beef (patch) | |
tree | 5cd9058a4483202c2f7e2ab6f5c44079a74ac157 /jstests/noPassthroughWithMongod/indexbg_interrupts.js | |
parent | 4de88387eec6c0bb08b10d0ba1574a656f56232d (diff) | |
download | mongo-0dabee8227d445a18fa5e8e49b2be60ba2a0beef.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} ); |