summaryrefslogtreecommitdiff
path: root/jstests/multiVersion/genericSetFCVUsage/1_test_launching_replset.js
diff options
context:
space:
mode:
authorLucas de Castro Borges <lucas@gnuabordo.com.br>2025-02-14 14:26:38 -0300
committerLucas de Castro Borges <lucas@gnuabordo.com.br>2025-02-14 14:26:38 -0300
commit294bc6ecabf14c09c9bc8644704921dcf97cb44e (patch)
tree279b1e0bab53901a1647ac63c1c724f0f789a663 /jstests/multiVersion/genericSetFCVUsage/1_test_launching_replset.js
parent70be7c27a251621187a1de533462ae2bb1e3bd39 (diff)
parent1e917fd798aa25b7066d4b414b51184f13d5a092 (diff)
Update upstream source from tag 'upstream/6.0.10'debian/6.0.10-1
Update to upstream version '6.0.10' with Debian dir 2d176fa254eee97b139f712fec5709641335a8c3
Diffstat (limited to 'jstests/multiVersion/genericSetFCVUsage/1_test_launching_replset.js')
-rw-r--r--jstests/multiVersion/genericSetFCVUsage/1_test_launching_replset.js55
1 files changed, 28 insertions, 27 deletions
diff --git a/jstests/multiVersion/genericSetFCVUsage/1_test_launching_replset.js b/jstests/multiVersion/genericSetFCVUsage/1_test_launching_replset.js
index 2d2fcbe85ae..69c110df30f 100644
--- a/jstests/multiVersion/genericSetFCVUsage/1_test_launching_replset.js
+++ b/jstests/multiVersion/genericSetFCVUsage/1_test_launching_replset.js
@@ -45,41 +45,42 @@ for (let versions of [["last-lts", "latest"], ["last-continuous", "latest"]]) {
rst.stopSet();
}
-// TODO(SERVER-61100): Re-enable this test.
-if (true) {
- jsTestLog("Skipping test as it is currently disabled.");
+if (MongoRunner.areBinVersionsTheSame("last-continuous", "last-lts")) {
+ jsTest.log("Skipping test because 'last-continuous' == 'last-lts'");
return;
}
for (let versions of [["last-lts", "last-continuous"], ["last-continuous", "last-lts"]]) {
jsTestLog("Testing mixed versions: " + tojson(versions));
- try {
- var rst = new ReplSetTest({nodes: 2});
- rst.startSet({binVersion: versions});
- rst.initiate();
- } catch (e) {
- if (e instanceof Error) {
- if (e.message.includes(
- "Can only specify one of 'last-lts' and 'last-continuous' in binVersion, not both.")) {
- continue;
- }
- }
- throw e;
- }
- assert(
- MongoRunner.areBinVersionsTheSame("last-continuous", "last-lts"),
- "Should have thrown error in creating ReplSetTest because can only specify one of 'last-lts' and 'last-continuous' in binVersion, not both.");
-
- var nodes = rst.nodes;
-
- // Make sure we have hosts of all the different versions
- var versionsFound = [];
- for (var j = 0; j < nodes.length; j++)
- versionsFound.push(nodes[j].getBinVersion());
+ var rst = new ReplSetTest({nodes: 2});
+ rst.startSet({binVersion: versions});
+ let err = assert.throws(() => rst.initiate());
+ assert(err.message.includes(
+ "Can only specify one of 'last-lts' and 'last-continuous' in binVersion, not both."),
+ err);
+ rst.stopSet();
+}
- assert.allBinVersions(versions, versionsFound);
+for (let versions of [["last-lts", "last-continuous"], ["last-continuous", "last-lts"]]) {
+ jsTestLog("Testing mixed versions: " + tojson(versions));
+ const rst = new ReplSetTest({
+ nodes: [
+ {
+ binVersion: versions[0],
+ },
+ {
+ binVersion: versions[1],
+ },
+ ]
+ });
+ rst.startSet();
+
+ let err = assert.throws(() => rst.initiate());
+ assert(err.message.includes(
+ "Can only specify one of 'last-lts' and 'last-continuous' in binVersion, not both."),
+ err);
rst.stopSet();
}