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

fix formatting in fsync2 test

This commit is contained in:
Eliot Horowitz 2012-06-04 11:37:56 -04:00
parent 67964f27dd
commit 18b5d97033

View File

@ -1,29 +1,33 @@
function doTest() {
db.fsync2.drop();
db.fsync2.save( {x:1} );
d = db.getSisterDB( "admin" );
assert.commandWorked( d.runCommand( {fsync:1, lock: 1 } ) );
for ( i=0; i<200; i++) {
assert.eq(1, db.fsync2.count());
sleep(1);
}
db.fsync2.save( {x:1} );
m = new Mongo( db.getMongo().host );
// Uncomment once SERVER-4243 is fixed
//assert.eq(1, m.getDB(db.getName()).fsync2.count());
assert( m.getDB("admin").$cmd.sys.unlock.findOne().ok );
db.getLastError();
assert.eq( 2, db.fsync2.count() );
}
if (!jsTest.options().auth) { // SERVER-4243
db.fsync2.drop();
db.fsync2.save( {x:1} );
d = db.getSisterDB( "admin" );
assert.commandWorked( d.runCommand( {fsync:1, lock: 1 } ) );
for ( i=0; i<200; i++) {
assert.eq(1, db.fsync2.count());
sleep(1);
}
db.fsync2.save( {x:1} );
m = new Mongo( db.getMongo().host );
// Uncomment once SERVER-4243 is fixed
//assert.eq(1, m.getDB(db.getName()).fsync2.count());
assert( m.getDB("admin").$cmd.sys.unlock.findOne().ok );
db.getLastError();
assert.eq( 2, db.fsync2.count() );
doTest();
}