summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcos José Grillo Ramirez <marcos.grillo@mongodb.com>2022-02-08 10:09:58 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-02-08 10:36:40 +0000
commit3d2f94f2ae5ee75c56adb6d29f35cfc74f81a181 (patch)
tree02e21abbb92e978e736c02bd186b1d00774cfd94
parent93af3393c758bfb0e36c2c8453813968c028417f (diff)
downloadmongo-3d2f94f2ae5ee75c56adb6d29f35cfc74f81a181.tar.gz
SERVER-63337 Add option to change log level in resharding tests
-rw-r--r--jstests/sharding/libs/resharding_test_fixture.js9
-rw-r--r--jstests/sharding/resharding_coordinator_recovers_abort_decision.js3
2 files changed, 11 insertions, 1 deletions
diff --git a/jstests/sharding/libs/resharding_test_fixture.js b/jstests/sharding/libs/resharding_test_fixture.js
index 099917d3bb0..0dbb8928dff 100644
--- a/jstests/sharding/libs/resharding_test_fixture.js
+++ b/jstests/sharding/libs/resharding_test_fixture.js
@@ -32,6 +32,7 @@ var ReshardingTest = class {
periodicNoopIntervalSecs: periodicNoopIntervalSecs = undefined,
writePeriodicNoops: writePeriodicNoops = undefined,
enableElections: enableElections = false,
+ logComponentVerbosity: logComponentVerbosity = undefined,
} = {}) {
// The @private JSDoc comments cause VS Code to not display the corresponding properties and
// methods in its autocomplete list. This makes it simpler for test authors to know what the
@@ -56,6 +57,8 @@ var ReshardingTest = class {
this._writePeriodicNoops = writePeriodicNoops;
/** @private */
this._enableElections = enableElections;
+ /** @private */
+ this._logComponentVerbosity = logComponentVerbosity;
// Properties set by setup().
/** @private */
@@ -143,6 +146,12 @@ var ReshardingTest = class {
rsOptions.setParameter.writePeriodicNoops = this._writePeriodicNoops;
}
+ if (this._logComponentVerbosity !== undefined) {
+ rsOptions.setParameter.logComponentVerbosity = this._logComponentVerbosity;
+ configOptions.setParameter.logComponentVerbosity = this._logComponentVerbosity;
+ mongosOptions.setParameter.logComponentVerbosity = this._logComponentVerbosity;
+ }
+
this._st = new ShardingTest({
mongos: 1,
mongosOptions,
diff --git a/jstests/sharding/resharding_coordinator_recovers_abort_decision.js b/jstests/sharding/resharding_coordinator_recovers_abort_decision.js
index cc1e6605c46..c06474cd527 100644
--- a/jstests/sharding/resharding_coordinator_recovers_abort_decision.js
+++ b/jstests/sharding/resharding_coordinator_recovers_abort_decision.js
@@ -9,7 +9,8 @@ load("jstests/libs/parallelTester.js");
load("jstests/libs/parallel_shell_helpers.js");
load("jstests/sharding/libs/resharding_test_fixture.js");
-const reshardingTest = new ReshardingTest({enableElections: true});
+const reshardingTest =
+ new ReshardingTest({enableElections: true, logComponentVerbosity: tojson({sharding: 2})});
reshardingTest.setup();
const donorShardNames = reshardingTest.donorShardNames;