diff options
5 files changed, 17 insertions, 13 deletions
diff --git a/buildscripts/resmokeconfig/suites/initial_sync_multiversion_fuzzer.yml b/buildscripts/resmokeconfig/suites/initial_sync_multiversion_fuzzer.yml index 1eb6c7125c5..563eadc9e62 100644 --- a/buildscripts/resmokeconfig/suites/initial_sync_multiversion_fuzzer.yml +++ b/buildscripts/resmokeconfig/suites/initial_sync_multiversion_fuzzer.yml @@ -22,4 +22,4 @@ executor: rollback: 0 setParameters: numInitialSyncAttempts: 10000000 - randomBinVersions: true + useRandomBinVersionsWithinReplicaSet: true diff --git a/buildscripts/resmokeconfig/suites/replica_sets_multiversion.yml b/buildscripts/resmokeconfig/suites/replica_sets_multiversion.yml index 59893a0e0b2..df0a90028f0 100644 --- a/buildscripts/resmokeconfig/suites/replica_sets_multiversion.yml +++ b/buildscripts/resmokeconfig/suites/replica_sets_multiversion.yml @@ -11,4 +11,4 @@ executor: readMode: commands global_vars: TestData: - randomBinVersions: true + useRandomBinVersionsWithinReplicaSet: true diff --git a/buildscripts/resmokeconfig/suites/rollback_multiversion_fuzzer.yml b/buildscripts/resmokeconfig/suites/rollback_multiversion_fuzzer.yml index 3960904f8b7..79ac136ee5a 100644 --- a/buildscripts/resmokeconfig/suites/rollback_multiversion_fuzzer.yml +++ b/buildscripts/resmokeconfig/suites/rollback_multiversion_fuzzer.yml @@ -21,4 +21,4 @@ executor: storage: recovery: 3 rollbackShutdowns: true - randomBinVersions: true + useRandomBinVersionsWithinReplicaSet: true diff --git a/src/mongo/shell/replsettest.js b/src/mongo/shell/replsettest.js index 1531b620780..023ae601a81 100644 --- a/src/mongo/shell/replsettest.js +++ b/src/mongo/shell/replsettest.js @@ -579,7 +579,7 @@ var ReplSetTest = function(opts) { var nodes = []; - if (jsTest.options().randomBinVersions) { + if (jsTest.options().useRandomBinVersionsWithinReplicaSet) { // Set the random seed to the value passed in by TestData. The seed is undefined // by default. Random.setRandomSeed(jsTest.options().seed); @@ -1043,7 +1043,7 @@ var ReplSetTest = function(opts) { isMultiversion = true; } }); - if (isMultiversion || jsTest.options().randomBinVersions) { + if (isMultiversion || jsTest.options().useRandomBinVersionsWithinReplicaSet) { assert.commandWorked( self.getPrimary().adminCommand({setFeatureCompatibilityVersion: lastStableFCV})); checkFCV(self.getPrimary().getDB("admin"), lastStableFCV); @@ -2351,8 +2351,10 @@ var ReplSetTest = function(opts) { dbpath: "$set-$node" }; - if (options && options.binVersion && jsTest.options().randomBinVersions) { - throw new Error("Can only specify one of binVersion and randomBinVersion, not both."); + if (options && options.binVersion && + jsTest.options().useRandomBinVersionsWithinReplicaSet) { + throw new Error( + "Can only specify one of binVersion and useRandomBinVersionsWithinReplicaSet, not both."); } // @@ -2379,7 +2381,7 @@ var ReplSetTest = function(opts) { } delete options.rsConfig; - if (jsTest.options().randomBinVersions) { + if (jsTest.options().useRandomBinVersionsWithinReplicaSet) { const rand = Random.rand(); options.binVersion = rand < 0.5 ? "latest" : "last-stable"; print("Randomly assigned binary version: " + options.binVersion + " to node: " + n); diff --git a/src/mongo/shell/utils.js b/src/mongo/shell/utils.js index 33689f5f8b9..c3377a1254e 100644 --- a/src/mongo/shell/utils.js +++ b/src/mongo/shell/utils.js @@ -337,12 +337,14 @@ jsTestOptions = function() { TestData.setSkipShardingPartsOfPrepareTransactionFailpoint || false, roleGraphInvalidationIsFatal: TestData.roleGraphInvalidationIsFatal || false, networkErrorAndTxnOverrideConfig: TestData.networkErrorAndTxnOverrideConfig || {}, - // When randomBinVersions is true, randomly assign the binary versions of each node - // in the replica set to 'latest' or 'last-stable'. + // When useRandomBinVersionsWithinReplicaSet is true, randomly assign the binary + // versions of each node in the replica set to 'latest' or 'last-stable'. // This flag is currently a placeholder and only sets the replica set to last-stable - // FCV. Randomized behavior will be implemented as part of SERVER-42774. - randomBinVersions: TestData.randomBinVersions || false, - // Set a specific random seed to be used when randomBinVersions is true. + // FCV. + useRandomBinVersionsWithinReplicaSet: + TestData.useRandomBinVersionsWithinReplicaSet || false, + // Set a specific random seed to be used when useRandomBinVersionsWithinReplicaSet is + // true. seed: TestData.seed || undefined, }); } |