diff options
author | Ivan Fefer <ivan.fefer@mongodb.com> | 2022-11-18 09:23:42 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-11-18 09:56:48 +0000 |
commit | 092b2eec8182bf540d73bd77649617ad2a36300d (patch) | |
tree | 3364e1909526b5db66c7a8c5e4adcfed19f3a404 /src | |
parent | 4ecad751532c5a04a8a8febb4b4f829f71e2e3c8 (diff) | |
download | mongo-092b2eec8182bf540d73bd77649617ad2a36300d.tar.gz |
SERVER-71320 Check for binVersion and useRandomBinVersion conflict after merge with node-specific optionsx
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/shell/replsettest.js | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/mongo/shell/replsettest.js b/src/mongo/shell/replsettest.js index c3ce7394822..10b800d07bb 100644 --- a/src/mongo/shell/replsettest.js +++ b/src/mongo/shell/replsettest.js @@ -2751,13 +2751,6 @@ var ReplSetTest = function(opts) { defaults.serverless = true; } - if (options && options.binVersion && - jsTest.options().useRandomBinVersionsWithinReplicaSet) { - throw new Error( - "Can only specify one of binVersion and useRandomBinVersionsWithinReplicaSet, not both."); - } - - // // Note : this replaces the binVersion of the shared startSet() options the first time // through, so the full set is guaranteed to have different versions if size > 1. If using // start() independently, independent version choices will be made @@ -2786,6 +2779,12 @@ var ReplSetTest = function(opts) { } delete options.rsConfig; + if (options && options.binVersion && + jsTest.options().useRandomBinVersionsWithinReplicaSet) { + throw new Error( + "Can only specify one of binVersion and useRandomBinVersionsWithinReplicaSet, not both."); + } + if (jsTest.options().useRandomBinVersionsWithinReplicaSet) { if (self.isConfigServer) { // Our documented upgrade/downgrade paths for a sharded cluster lets us assume that |