summaryrefslogtreecommitdiff
path: root/jstests/replsets/toostale.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/toostale.js
parente44682821c37fdf3d4fd8cb58dcf5c34181ddbde (diff)
downloadmongo-eb41492c6f1228077b92239524e4a607b70cd8e3.tar.gz
SERVER-13190 migrate replset jstest suite to use write commands api
Diffstat (limited to 'jstests/replsets/toostale.js')
-rw-r--r--jstests/replsets/toostale.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/jstests/replsets/toostale.js b/jstests/replsets/toostale.js
index 08b1a9c2c6f..9aaffd210cc 100644
--- a/jstests/replsets/toostale.js
+++ b/jstests/replsets/toostale.js
@@ -45,7 +45,7 @@ var reconnect = function(a) {
var name = "toostale"
-var replTest = new ReplSetTest( {name: name, nodes: 3});
+var replTest = new ReplSetTest({ name: name, nodes: 3, oplogSize: 5 });
var host = getHostName();
var nodes = replTest.startSet();
@@ -76,10 +76,13 @@ reconnect(master.getDB("local"));
var count = master.getDB("local").oplog.rs.count();
var prevCount = -1;
while (count != prevCount) {
- print("inserting 10000");
- for (var i = 0; i < 10000; i++) {
- mdb.bar.insert({x:i, date : new Date(), str : "safkaldmfaksndfkjansfdjanfjkafa"});
+ print("inserting 1000");
+ var bulk = mdb.bar.initializeUnorderedBulkOp();
+ for (var i = 0; i < 1000; i++) {
+ bulk.insert({ x: i, date: new Date(), str: "safkaldmfaksndfkjansfdjanfjkafa" });
}
+ assert.writeOK(bulk.execute());
+
prevCount = count;
replTest.awaitReplication();
count = master.getDB("local").oplog.rs.count();