summaryrefslogtreecommitdiff
path: root/jstests/replsets/replset1.js
diff options
context:
space:
mode:
authorRandolph Tan <randolph@10gen.com>2014-03-03 11:27:18 -0500
committerRandolph Tan <randolph@10gen.com>2014-03-14 12:05:05 -0400
commiteb41492c6f1228077b92239524e4a607b70cd8e3 (patch)
treec90485d43753aa756063d0a6e8f67b8843931bba /jstests/replsets/replset1.js
parente44682821c37fdf3d4fd8cb58dcf5c34181ddbde (diff)
downloadmongo-eb41492c6f1228077b92239524e4a607b70cd8e3.tar.gz
SERVER-13190 migrate replset jstest suite to use write commands api
Diffstat (limited to 'jstests/replsets/replset1.js')
-rw-r--r--jstests/replsets/replset1.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/jstests/replsets/replset1.js b/jstests/replsets/replset1.js
index f156c8ec6a9..fb5d163cae5 100644
--- a/jstests/replsets/replset1.js
+++ b/jstests/replsets/replset1.js
@@ -68,10 +68,11 @@ doTest = function( signal ) {
assert.eq( 1000 , cppconn.foo.findOne().a , "cppconn 2" );
// Now let's write some documents to the new master
+ var bulk = new_master.getDB("bar").bar.initializeUnorderedBulkOp();
for(var i=0; i<1000; i++) {
- new_master.getDB("bar").bar.save({a: i});
+ bulk.insert({ a: i });
}
- new_master.getDB("admin").runCommand({getlasterror: 1});
+ bulk.execute();
// Here's how to restart the old master node:
slave = replTest.restart(master_id);