diff options
author | Randolph Tan <randolph@10gen.com> | 2014-11-25 18:10:44 -0500 |
---|---|---|
committer | Randolph Tan <randolph@10gen.com> | 2014-11-25 18:10:44 -0500 |
commit | 958359a8d6d97011151142f7061aa9c2f742d0c8 (patch) | |
tree | 406ee4f81f2aad7c1608deb767aae1870b72834a /jstests | |
parent | afcb321a7d8aadabab127c84430f794feec2654d (diff) | |
download | mongo-958359a8d6d97011151142f7061aa9c2f742d0c8.tar.gz |
Revert "SERVER-13741 Migrate remaining tests to use write commands"
This reverts commit 242357a978d73724119fef759f9f30598a1420cc.
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()); |