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

24 lines
472 B
JavaScript
Raw Normal View History

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();
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 } ) );
assert.eq(1, db.fsync2.count());
db.fsync2.save( {x:1} );
2010-01-04 19:50:36 +01:00
m = new Mongo( db.getMongo().host );
2011-11-15 18:25:53 +01:00
// Uncomment once SERVER-4243 is fixed
//assert.eq(1, m.getDB(db.getName()).fsync2.count());
assert( m.getDB("admin").$cmd.sys.unlock.findOne().ok );
2010-01-04 19:50:36 +01:00
assert.eq( 2, db.fsync2.count() );
2011-11-15 18:25:53 +01:00
}