summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIvan Fefer <ivan.fefer@mongodb.com>2022-11-18 09:23:42 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-11-18 09:56:48 +0000
commit092b2eec8182bf540d73bd77649617ad2a36300d (patch)
tree3364e1909526b5db66c7a8c5e4adcfed19f3a404 /src
parent4ecad751532c5a04a8a8febb4b4f829f71e2e3c8 (diff)
downloadmongo-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.js13
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