0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 01:21:03 +01:00

make fsync2 test more reliable

This commit is contained in:
Eliot Horowitz 2012-02-03 09:28:35 -05:00
parent d2cb8eaf86
commit 20761c191e

View File

@ -8,7 +8,10 @@ d = db.getSisterDB( "admin" );
assert.commandWorked( d.runCommand( {fsync:1, lock: 1 } ) );
assert.eq(1, db.fsync2.count());
for ( i=0; i<200; i++) {
assert.eq(1, db.fsync2.count());
sleep(1);
}
db.fsync2.save( {x:1} );
@ -19,6 +22,8 @@ m = new Mongo( db.getMongo().host );
assert( m.getDB("admin").$cmd.sys.unlock.findOne().ok );
db.getLastError();
assert.eq( 2, db.fsync2.count() );
}