summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJudah Schvimer <judah@mongodb.com>2016-09-23 16:00:35 -0400
committerJudah Schvimer <judah@mongodb.com>2016-10-19 16:30:07 -0400
commit60ae1ebd421423ba81e193e2823eed57468a7371 (patch)
treea92bf6d62f316604c62d701caa751a7db92bcebb
parent01048382eb13ebb67a41c913e53ce165e92cb1a7 (diff)
downloadmongo-60ae1ebd421423ba81e193e2823eed57468a7371.tar.gz
SERVER-26296 oplog_replay_on_startup.js should skip fatal tests when journalling is off
(cherry picked from commit f92459e715201b03cd78fafaf71f5eb12525e7d5)
-rw-r--r--jstests/replsets/oplog_replay_on_startup.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/jstests/replsets/oplog_replay_on_startup.js b/jstests/replsets/oplog_replay_on_startup.js
index 0864c781d0c..19f2504795a 100644
--- a/jstests/replsets/oplog_replay_on_startup.js
+++ b/jstests/replsets/oplog_replay_on_startup.js
@@ -15,6 +15,8 @@
rst.initiate();
var conn = rst.getPrimary(); // Waits for PRIMARY state.
+ var nojournal = Array.contains(conn.adminCommand({getCmdLineOpts: 1}).argv, '--nojournal');
+ var storageEngine = jsTest.options().storageEngine;
var term = conn.getCollection('local.oplog.rs').find().sort({$natural: -1}).limit(1).next().t;
if (typeof(term) == 'undefined') {
term = -1; // Use a dummy term for PV0.
@@ -29,6 +31,12 @@
expectedState,
expectedApplied,
}) {
+ if (nojournal && (storageEngine === 'mmapv1') && expectedState === 'FATAL') {
+ // We can't test fatal states on mmap without a journal because it won't be able
+ // to start up again.
+ return;
+ }
+
if (term != -1) {
term++; // Each test gets a new term on PV1 to ensure OpTimes always move forward.
}