0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-28 07:59:02 +01:00
mongodb/jstests/repl/block1.js

20 lines
333 B
JavaScript

var rt = new ReplTest("block1");
m = rt.start(true);
s = rt.start(false);
dbm = m.getDB("foo");
dbs = s.getDB("foo");
tm = dbm.bar;
ts = dbs.bar;
for (var i = 0; i < 1000; i++) {
tm.insert({_id: i}, {writeConcern: {w: 2}});
assert.eq(i + 1, ts.count(), "A" + i);
assert.eq(i + 1, tm.count(), "B" + i);
}
rt.stop();