summaryrefslogtreecommitdiff
path: root/jstests/replsets/rslib.js
diff options
context:
space:
mode:
authorSiyuan Zhou <siyuan.zhou@mongodb.com>2017-10-24 00:11:01 -0400
committerSiyuan Zhou <siyuan.zhou@mongodb.com>2017-10-27 17:54:41 -0400
commitdb64381873afebf1532a0fd576499f72da00b703 (patch)
tree8808de08a4f5231e365d72fc7a38a827e357a5e3 /jstests/replsets/rslib.js
parent47d0725774deadc00ef3b6d29a0f9be4ee134683 (diff)
downloadmongo-db64381873afebf1532a0fd576499f72da00b703.tar.gz
SERVER-31002 minValid should alway be set to existent OpTime.
Diffstat (limited to 'jstests/replsets/rslib.js')
-rw-r--r--jstests/replsets/rslib.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/jstests/replsets/rslib.js b/jstests/replsets/rslib.js
index ecaf21e5d46..1cb338ceeae 100644
--- a/jstests/replsets/rslib.js
+++ b/jstests/replsets/rslib.js
@@ -13,6 +13,7 @@ var waitForState;
var reInitiateWithoutThrowingOnAbortedMember;
var awaitRSClientHosts;
var getLastOpTime;
+var setLogVerbosity;
(function() {
"use strict";
@@ -433,4 +434,19 @@ var getLastOpTime;
var connStatus = replSetStatus.members.filter(m => m.self)[0];
return connStatus.optime;
};
+
+ /**
+ * Set log verbosity on all given nodes.
+ * e.g. setLogVerbosity(replTest.nodes, { "replication": {"verbosity": 3} });
+ */
+ setLogVerbosity = function(nodes, logVerbosity) {
+ var verbosity = {
+ "setParameter": 1,
+ "logComponentVerbosity": logVerbosity,
+ };
+ nodes.forEach(function(node) {
+ assert.commandWorked(node.adminCommand(verbosity));
+ });
+ };
+
}());