summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCheahuychou Mao <mao.cheahuychou@gmail.com>2021-05-23 03:03:28 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-05-24 18:56:59 +0000
commitfcfbbb2f07cff7dac2e837b2a2cf601d602bdab8 (patch)
tree51378ee1f618de479a4ec92afddea051d3a01c43
parent13ce090d81c8ad14fd9bf9792ed081f55034192e (diff)
downloadmongo-fcfbbb2f07cff7dac2e837b2a2cf601d602bdab8.tar.gz
SERVER-57141 Ensure that ReplSetTests in tenant migration tests have the intended node options
(cherry picked from commit fe6bb636fb7d7489f6e67eecfe76caa847a149fd)
-rw-r--r--jstests/replsets/tenant_migration_donor_kill_op_retry.js10
-rw-r--r--jstests/replsets/tenant_migration_donor_resume_on_stepup_and_restart.js8
-rw-r--r--jstests/replsets/tenant_migration_donor_rollback_recovery.js4
-rw-r--r--jstests/replsets/tenant_migration_donor_try_abort.js4
-rw-r--r--jstests/replsets/tenant_migration_external_keys_ttl.js2
-rw-r--r--jstests/replsets/tenant_migration_metrics_output.js4
-rw-r--r--jstests/replsets/tenant_migration_recipient_resume_on_stepup_and_restart.js4
-rw-r--r--jstests/replsets/tenant_migration_recipient_rollback_recovery.js4
8 files changed, 19 insertions, 21 deletions
diff --git a/jstests/replsets/tenant_migration_donor_kill_op_retry.js b/jstests/replsets/tenant_migration_donor_kill_op_retry.js
index 99b5a436177..e834c8e98e1 100644
--- a/jstests/replsets/tenant_migration_donor_kill_op_retry.js
+++ b/jstests/replsets/tenant_migration_donor_kill_op_retry.js
@@ -149,9 +149,9 @@ if (!tenantMigrationTest.isFeatureFlagEnabled()) {
];
for (let fpName of fpNames) {
tenantMigrationTest.getDonorRst().stopSet();
- tenantMigrationTest.getDonorRst().startSet(
- Object.assign(migrationX509Options.donor,
- {setParameter: {['failpoint.' + fpName]: tojson({mode: 'alwaysOn'})}}));
+ tenantMigrationTest.getDonorRst().startSet(Object.assign({}, migrationX509Options.donor, {
+ setParameter: {['failpoint.' + fpName]: tojson({mode: 'alwaysOn'})}
+ }));
tenantMigrationTest.getDonorRst().initiate();
TenantMigrationUtil.createTenantMigrationRecipientRoleIfNotExist(
tenantMigrationTest.getDonorRst());
@@ -195,14 +195,14 @@ if (!tenantMigrationTest.isFeatureFlagEnabled()) {
// This section is testing behavior during garbage collection.
tenantMigrationTest.getDonorRst().stopSet();
tenantMigrationTest.getDonorRst().startSet(
- Object.assign(migrationX509Options.donor, {setParameter: garbageCollectionOpts}));
+ Object.assign({}, migrationX509Options.donor, {setParameter: garbageCollectionOpts}));
tenantMigrationTest.getDonorRst().initiate();
TenantMigrationUtil.createTenantMigrationRecipientRoleIfNotExist(
tenantMigrationTest.getDonorRst());
tenantMigrationTest.getRecipientRst().stopSet();
tenantMigrationTest.getRecipientRst().startSet(
- Object.assign(migrationX509Options.recipient, {setParameter: garbageCollectionOpts}));
+ Object.assign({}, migrationX509Options.recipient, {setParameter: garbageCollectionOpts}));
tenantMigrationTest.getRecipientRst().initiate();
TenantMigrationUtil.createTenantMigrationDonorRoleIfNotExist(
tenantMigrationTest.getRecipientRst());
diff --git a/jstests/replsets/tenant_migration_donor_resume_on_stepup_and_restart.js b/jstests/replsets/tenant_migration_donor_resume_on_stepup_and_restart.js
index 18a9ab3af04..76a563f447d 100644
--- a/jstests/replsets/tenant_migration_donor_resume_on_stepup_and_restart.js
+++ b/jstests/replsets/tenant_migration_donor_resume_on_stepup_and_restart.js
@@ -110,7 +110,7 @@ function testDonorForgetMigrationInterrupt(interruptFunc) {
const donorRst = new ReplSetTest({
nodes: 3,
name: "donorRst",
- nodeOptions: Object.assign(migrationX509Options.donor, {
+ nodeOptions: Object.assign({}, migrationX509Options.donor, {
setParameter: {
tenantMigrationGarbageCollectionDelayMS: kGarbageCollectionDelayMS,
ttlMonitorSleepSecs: kTTLMonitorSleepSecs,
@@ -120,7 +120,7 @@ function testDonorForgetMigrationInterrupt(interruptFunc) {
const recipientRst = new ReplSetTest({
nodes: 1,
name: "recipientRst",
- nodeOptions: Object.assign(migrationX509Options.recipient, {
+ nodeOptions: Object.assign({}, migrationX509Options.recipient, {
setParameter: {
tenantMigrationGarbageCollectionDelayMS: kGarbageCollectionDelayMS,
ttlMonitorSleepSecs: kTTLMonitorSleepSecs,
@@ -190,7 +190,7 @@ function testDonorAbortMigrationInterrupt(interruptFunc, fpName, isShutdown = fa
const donorRst = new ReplSetTest({
nodes: 3,
name: "donorRst",
- nodeOptions: Object.assign(migrationX509Options.donor, {
+ nodeOptions: Object.assign({}, migrationX509Options.donor, {
setParameter: {
tenantMigrationGarbageCollectionDelayMS: kGarbageCollectionDelayMS,
ttlMonitorSleepSecs: kTTLMonitorSleepSecs,
@@ -200,7 +200,7 @@ function testDonorAbortMigrationInterrupt(interruptFunc, fpName, isShutdown = fa
const recipientRst = new ReplSetTest({
nodes: 1,
name: "recipientRst",
- nodeOptions: Object.assign(migrationX509Options.recipient, {
+ nodeOptions: Object.assign({}, migrationX509Options.recipient, {
setParameter: {
tenantMigrationGarbageCollectionDelayMS: kGarbageCollectionDelayMS,
ttlMonitorSleepSecs: kTTLMonitorSleepSecs,
diff --git a/jstests/replsets/tenant_migration_donor_rollback_recovery.js b/jstests/replsets/tenant_migration_donor_rollback_recovery.js
index ff84d347487..c31be907360 100644
--- a/jstests/replsets/tenant_migration_donor_rollback_recovery.js
+++ b/jstests/replsets/tenant_migration_donor_rollback_recovery.js
@@ -28,7 +28,7 @@ const migrationX509Options = TenantMigrationUtil.makeX509OptionsForTest();
const recipientRst = new ReplSetTest({
name: "recipientRst",
nodes: 1,
- nodeOptions: Object.assign(migrationX509Options.recipient, {
+ nodeOptions: Object.assign({}, migrationX509Options.recipient, {
setParameter: {
tenantMigrationGarbageCollectionDelayMS: kGarbageCollectionDelayMS,
ttlMonitorSleepSecs: 1,
@@ -63,7 +63,7 @@ function testRollBack(setUpFunc, rollbackOpsFunc, steadyStateFunc) {
const donorRst = new ReplSetTest({
name: "donorRst",
nodes: 3,
- nodeOptions: Object.assign(migrationX509Options.donor, {
+ nodeOptions: Object.assign({}, migrationX509Options.donor, {
setParameter: {
tenantMigrationGarbageCollectionDelayMS: kGarbageCollectionDelayMS,
ttlMonitorSleepSecs: 1,
diff --git a/jstests/replsets/tenant_migration_donor_try_abort.js b/jstests/replsets/tenant_migration_donor_try_abort.js
index 5c3e5372ad1..4e019488456 100644
--- a/jstests/replsets/tenant_migration_donor_try_abort.js
+++ b/jstests/replsets/tenant_migration_donor_try_abort.js
@@ -519,8 +519,8 @@ const migrationX509Options = TenantMigrationUtil.makeX509OptionsForTest();
(() => {
jsTestLog("Test sending donorAbortMigration for a non-existent tenant migration.");
- const donorRst = new ReplSetTest(
- {nodes: 2, name: "donorRst", nodeOptions: Object.assign(migrationX509Options.donor)});
+ const donorRst =
+ new ReplSetTest({nodes: 2, name: "donorRst", nodeOptions: migrationX509Options.donor});
donorRst.startSet();
donorRst.initiate();
diff --git a/jstests/replsets/tenant_migration_external_keys_ttl.js b/jstests/replsets/tenant_migration_external_keys_ttl.js
index 60a9f982f38..8d7f0b58859 100644
--- a/jstests/replsets/tenant_migration_external_keys_ttl.js
+++ b/jstests/replsets/tenant_migration_external_keys_ttl.js
@@ -16,7 +16,6 @@ load("jstests/libs/parallelTester.js");
const kExternalKeysTTLIndexName = "ExternalKeysTTLIndex";
const kTenantIdPrefix = "testTenantId";
-const migrationX509Options = TenantMigrationUtil.makeX509OptionsForTest();
const ttlMonitorOptions = {
ttlMonitorSleepSecs: 1
};
@@ -199,6 +198,7 @@ function makeTestParams() {
//
(() => {
+ const migrationX509Options = TenantMigrationUtil.makeX509OptionsForTest();
const donorRst = new ReplSetTest({
nodes: 3,
name: "donorRst",
diff --git a/jstests/replsets/tenant_migration_metrics_output.js b/jstests/replsets/tenant_migration_metrics_output.js
index ac108be13e5..b56941f3787 100644
--- a/jstests/replsets/tenant_migration_metrics_output.js
+++ b/jstests/replsets/tenant_migration_metrics_output.js
@@ -13,8 +13,6 @@ load("jstests/libs/uuid_util.js");
load("jstests/replsets/libs/tenant_migration_test.js");
load("jstests/replsets/libs/tenant_migration_util.js");
-const migrationX509Options = TenantMigrationUtil.makeX509OptionsForTest();
-
// Verify that the server status response has the fields that we expect.
function verifyServerStatus(conn) {
const res = assert.commandWorked(conn.adminCommand({serverStatus: 1}));
@@ -33,7 +31,7 @@ const testPath = MongoRunner.toRealPath("ftdc_dir_repl_node");
const donorRst = new ReplSetTest({
nodes: 1,
name: "donorRst",
- nodeOptions: Object.assign(migrationX509Options.donor,
+ nodeOptions: Object.assign(TenantMigrationUtil.makeX509OptionsForTest().donor,
{setParameter: {diagnosticDataCollectionDirectoryPath: testPath}})
});
diff --git a/jstests/replsets/tenant_migration_recipient_resume_on_stepup_and_restart.js b/jstests/replsets/tenant_migration_recipient_resume_on_stepup_and_restart.js
index c70cca50eaf..032c6f66941 100644
--- a/jstests/replsets/tenant_migration_recipient_resume_on_stepup_and_restart.js
+++ b/jstests/replsets/tenant_migration_recipient_resume_on_stepup_and_restart.js
@@ -103,7 +103,7 @@ function testRecipientForgetMigrationInterrupt(interruptFunc) {
const donorRst = new ReplSetTest({
nodes: 1,
name: "donorRst",
- nodeOptions: Object.assign(migrationX509Options.donor, {
+ nodeOptions: Object.assign({}, migrationX509Options.donor, {
setParameter: {
tenantMigrationGarbageCollectionDelayMS: kGarbageCollectionDelayMS,
ttlMonitorSleepSecs: kTTLMonitorSleepSecs,
@@ -113,7 +113,7 @@ function testRecipientForgetMigrationInterrupt(interruptFunc) {
const recipientRst = new ReplSetTest({
nodes: 3,
name: "recipientRst",
- nodeOptions: Object.assign(migrationX509Options.recipient, {
+ nodeOptions: Object.assign({}, migrationX509Options.recipient, {
setParameter: {
tenantMigrationGarbageCollectionDelayMS: kGarbageCollectionDelayMS,
ttlMonitorSleepSecs: kTTLMonitorSleepSecs,
diff --git a/jstests/replsets/tenant_migration_recipient_rollback_recovery.js b/jstests/replsets/tenant_migration_recipient_rollback_recovery.js
index 20eb692cdbf..e06401717cc 100644
--- a/jstests/replsets/tenant_migration_recipient_rollback_recovery.js
+++ b/jstests/replsets/tenant_migration_recipient_rollback_recovery.js
@@ -28,7 +28,7 @@ const migrationX509Options = TenantMigrationUtil.makeX509OptionsForTest();
const donorRst = new ReplSetTest({
name: "donorRst",
nodes: 1,
- nodeOptions: Object.assign(migrationX509Options.donor, {
+ nodeOptions: Object.assign({}, migrationX509Options.donor, {
setParameter: {
tenantMigrationGarbageCollectionDelayMS: kGarbageCollectionDelayMS,
ttlMonitorSleepSecs: 1,
@@ -65,7 +65,7 @@ function testRollBack(setUpFunc, rollbackOpsFunc, steadyStateFunc) {
const recipientRst = new ReplSetTest({
name: "recipientRst",
nodes: 3,
- nodeOptions: Object.assign(migrationX509Options.recipient, {
+ nodeOptions: Object.assign({}, migrationX509Options.recipient, {
setParameter: {
tenantMigrationGarbageCollectionDelayMS: kGarbageCollectionDelayMS,
ttlMonitorSleepSecs: 1,