2011-11-15 18:25:53 +01:00
|
|
|
if (!jsTest.options().auth) { // SERVER-4243
|
|
|
|
|
2010-01-04 19:50:36 +01:00
|
|
|
db.fsync2.drop();
|
|
|
|
|
2011-11-15 03:29:44 +01:00
|
|
|
db.fsync2.save( {x:1} );
|
|
|
|
|
2010-01-04 19:50:36 +01:00
|
|
|
d = db.getSisterDB( "admin" );
|
|
|
|
|
|
|
|
assert.commandWorked( d.runCommand( {fsync:1, lock: 1 } ) );
|
|
|
|
|
2011-11-15 03:29:44 +01:00
|
|
|
assert.eq(1, db.fsync2.count());
|
|
|
|
|
2010-01-04 22:37:28 +01:00
|
|
|
db.fsync2.save( {x:1} );
|
2010-01-04 19:50:36 +01:00
|
|
|
|
|
|
|
m = new Mongo( db.getMongo().host );
|
2010-01-04 22:37:28 +01:00
|
|
|
|
2011-11-15 18:25:53 +01:00
|
|
|
// Uncomment once SERVER-4243 is fixed
|
|
|
|
//assert.eq(1, m.getDB(db.getName()).fsync2.count());
|
2011-11-15 03:29:44 +01:00
|
|
|
|
2010-01-04 22:37:28 +01:00
|
|
|
assert( m.getDB("admin").$cmd.sys.unlock.findOne().ok );
|
2010-01-04 19:50:36 +01:00
|
|
|
|
2011-11-15 03:29:44 +01:00
|
|
|
assert.eq( 2, db.fsync2.count() );
|
2011-11-15 18:25:53 +01:00
|
|
|
|
|
|
|
}
|