summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJudah Schvimer <judah@mongodb.com>2016-09-23 16:00:35 -0400
committerJudah Schvimer <judah@mongodb.com>2016-09-23 16:00:35 -0400
commitf92459e715201b03cd78fafaf71f5eb12525e7d5 (patch)
tree75b49daccbfc93b274b7cdb595bf28faaacfe8e7
parentaad3bcd6d14152459ff362f69b2e20ebbd68b053 (diff)
downloadmongo-f92459e715201b03cd78fafaf71f5eb12525e7d5.tar.gz
SERVER-26296 oplog_replay_on_startup.js should skip fatal tests when journalling is off
-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 4b1affa61dd..050cbe1cc5d 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.
}