summaryrefslogtreecommitdiff
path: root/jstests/repl/block1.js
blob: ab4272703409b1784a091fa6a2f8726aa4dab65d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

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();