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

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 } );
    dbm.runCommand( { getlasterror : 1 , w : 2 } )
    assert.eq( i + 1 , ts.count() , "A" + i );
    assert.eq( i + 1 , tm.count() , "B" + i );
}

rt.stop();