summaryrefslogtreecommitdiff
path: root/jstests/fsync.js
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2011-03-17 21:08:36 -0400
committerMathias Stearn <mathias@10gen.com>2011-03-17 21:12:46 -0400
commit1f0b0fe089e31e159344a9472513c31d5c577318 (patch)
treea53e95c7fa342475c929fdafa1453f3b768f0163 /jstests/fsync.js
parent7429a7411a622a01d25dea3bd76d2af9e6fc77cc (diff)
downloadmongo-1f0b0fe089e31e159344a9472513c31d5c577318.tar.gz
db.fsyncUnlock() now waits for unlock to actually happen SERVER-2789
Diffstat (limited to 'jstests/fsync.js')
-rw-r--r--jstests/fsync.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/jstests/fsync.js b/jstests/fsync.js
index bb31d986d9d..134d558c084 100644
--- a/jstests/fsync.js
+++ b/jstests/fsync.js
@@ -11,10 +11,11 @@ y = db.currentOp();
assert(y.fsyncLock,"B");
z = db.fsyncUnlock();
+assert( db.currentOp().fsyncLock == null, "A2" );
-// it will take some time to unlock, and unlock does not block and wait for that
-// doing a write will make us wait until db is writeable.
+// make sure the db is unlocked
db.jstests_fsync.insert({x:1});
+db.getLastError();
assert( db.currentOp().fsyncLock == null, "A" );