mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
25 lines
384 B
JavaScript
25 lines
384 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 } );
|
|
dbm.runCommand( { getlasterror : 1 , w : 2 } )
|
|
assert.eq( i + 1 , ts.count() , "A" + i );
|
|
assert.eq( i + 1 , tm.count() , "B" + i );
|
|
}
|
|
|
|
rt.stop();
|
|
|
|
|
|
|
|
|