diff options
author | Spencer T Brody <spencer@10gen.com> | 2011-11-14 21:29:44 -0500 |
---|---|---|
committer | Spencer T Brody <spencer@10gen.com> | 2011-11-14 21:29:44 -0500 |
commit | ab709c21922572429f31b78a74c661e64ff84270 (patch) | |
tree | 639e457b40549396828a690a389114f816e2e211 /jstests/fsync2.js | |
parent | 6c88cf0b68e8dbec9920125fcdae4bb114be2c59 (diff) | |
download | mongo-ab709c21922572429f31b78a74c661e64ff84270.tar.gz |
Test that reads don't get blocked by writes when fsync-locked. SERVER-4243
Diffstat (limited to 'jstests/fsync2.js')
-rw-r--r-- | jstests/fsync2.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/jstests/fsync2.js b/jstests/fsync2.js index 2b5370b06ba..d81eaf3bc1c 100644 --- a/jstests/fsync2.js +++ b/jstests/fsync2.js @@ -1,15 +1,19 @@ db.fsync2.drop(); +db.fsync2.save( {x:1} ); + d = db.getSisterDB( "admin" ); assert.commandWorked( d.runCommand( {fsync:1, lock: 1 } ) ); -// uncomment when fixed SERVER-519 +assert.eq(1, db.fsync2.count()); + db.fsync2.save( {x:1} ); m = new Mongo( db.getMongo().host ); +assert.eq(1, m.getDB(db.getName()).fsync2.count()); + assert( m.getDB("admin").$cmd.sys.unlock.findOne().ok ); -// uncomment when fixed SERVER-519 -assert.eq( 1, db.fsync2.count() ); +assert.eq( 2, db.fsync2.count() ); |