0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00
mongodb/jstests/repl/block1.js

24 lines
357 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();