diff options
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/ssl/sharding_with_x509.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/jstests/ssl/sharding_with_x509.js b/jstests/ssl/sharding_with_x509.js index 559fb325c7f..245c10e9855 100644 --- a/jstests/ssl/sharding_with_x509.js +++ b/jstests/ssl/sharding_with_x509.js @@ -30,7 +30,7 @@ print( "starting insertion phase" ) // Insert a bunch of data var toInsert = 2000; -var bulk = coll.initializeUnorderedBulkOp(); +var bulk = coll.initializedUnorderedBulkOp(); for( var i = 0; i < toInsert; i++ ){ bulk.insert({ my: "test", data: "to", insert: i }); } @@ -40,10 +40,10 @@ print( "starting updating phase" ) // Update a bunch of data var toUpdate = toInsert; -bulk = coll.initializeUnorderedBulkOp(); +bulk = coll.initializedUnorderedBulkOp(); for( var i = 0; i < toUpdate; i++ ){ var id = coll.findOne({ insert : i })._id; - bulk.find({ insert : i, _id : id }).update({ $inc : { counter : 1 } }); + bulk.update({ insert : i, _id : id }, { $inc : { counter : 1 } }); } assert.writeOK(bulk.execute()); @@ -51,9 +51,9 @@ print( "starting deletion" ) // Remove a bunch of data var toDelete = toInsert / 2; -bulk = coll.initializeUnorderedBulkOp(); +bulk = coll.initializedUnorderedBulkOp(); for( var i = 0; i < toDelete; i++ ){ - bulk.find({ insert : i }).remove(); + bulk.remove({ insert : i }); } assert.writeOK(bulk.execute()); |