diff options
Diffstat (limited to 'jstests/replsets/libs/rollback_test.js')
-rw-r--r-- | jstests/replsets/libs/rollback_test.js | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/jstests/replsets/libs/rollback_test.js b/jstests/replsets/libs/rollback_test.js index 5e70cd96614..8a19b15b51d 100644 --- a/jstests/replsets/libs/rollback_test.js +++ b/jstests/replsets/libs/rollback_test.js @@ -67,8 +67,10 @@ load('jstests/libs/fail_point_util.js'); * * @param {string} [optional] name the name of the test being run * @param {Object} [optional] replSet the ReplSetTest instance to adopt + * @param {Object} [optional] nodeOptions command-line options to apply to all nodes in the replica + * set. Ignored if 'replSet' is provided. */ -function RollbackTest(name = "RollbackTest", replSet) { +function RollbackTest(name = "RollbackTest", replSet, nodeOptions) { const State = { kStopped: "kStopped", kRollbackOps: "kRollbackOps", @@ -104,7 +106,7 @@ function RollbackTest(name = "RollbackTest", replSet) { let lastRBID; // Make sure we have a replica set up and running. - replSet = (replSet === undefined) ? performStandardSetup() : replSet; + replSet = (replSet === undefined) ? performStandardSetup(nodeOptions) : replSet; validateAndUseSetup(replSet); // Majority writes in the initial phase, before transitionToRollbackOperations(), should be @@ -204,12 +206,12 @@ function RollbackTest(name = "RollbackTest", replSet) { * * Note: One of the secondaries will have a priority of 0. */ - function performStandardSetup() { - let nodeOptions = {}; + function performStandardSetup(nodeOptions) { + nodeOptions = nodeOptions || {}; if (TestData.logComponentVerbosity) { - nodeOptions["setParameter"] = { - "logComponentVerbosity": tojsononeline(TestData.logComponentVerbosity) - }; + nodeOptions["setParameter"] = nodeOptions["setParameter"] || {}; + nodeOptions["setParameter"]["logComponentVerbosity"] = + tojsononeline(TestData.logComponentVerbosity); } if (TestData.syncdelay) { nodeOptions["syncdelay"] = TestData.syncdelay; |