summaryrefslogtreecommitdiff
path: root/jstests/gle
diff options
context:
space:
mode:
authorSiyuan Zhou <siyuan.zhou@mongodb.com>2017-05-05 17:58:36 -0400
committerSiyuan Zhou <siyuan.zhou@mongodb.com>2017-05-19 15:21:09 -0400
commit1e123960e3d2c4d7738d9c53fdbc3c6cdceea552 (patch)
treef057c23efd9193783103ff3527530dd6bf00c21c /jstests/gle
parentf7c5e33fc4634658877bafdb607c3865787acc7c (diff)
downloadmongo-1e123960e3d2c4d7738d9c53fdbc3c6cdceea552.tar.gz
SERVER-29100 Wait for the same journaling requirement in get_last_error.js
Diffstat (limited to 'jstests/gle')
-rw-r--r--jstests/gle/get_last_error.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/jstests/gle/get_last_error.js b/jstests/gle/get_last_error.js
index d3542520c27..6c8a7a0bba1 100644
--- a/jstests/gle/get_last_error.js
+++ b/jstests/gle/get_last_error.js
@@ -62,7 +62,9 @@ assert.eq(gle.wtime, null);
assert.gte(gle.waited, 5);
assert.eq(gle.wtimeout, true);
-gle = mdb.getLastErrorObj("majority", 50);
+// Wait with { j: false }. { w: "majority" } waits for journaling by default,
+// so we override the behavior to make it the same as the previous getLastError command.
+gle = mdb.getLastErrorObj("majority", 50, false);
print('Trying w=majority, 50ms timeout.');
printjson(gle);
assert.eq(gle.ok, 1);