diff options
Diffstat (limited to 'jstests/multiVersion/genericSetFCVUsage/1_test_launching_replset.js')
| -rw-r--r-- | jstests/multiVersion/genericSetFCVUsage/1_test_launching_replset.js | 55 |
1 files changed, 27 insertions, 28 deletions
diff --git a/jstests/multiVersion/genericSetFCVUsage/1_test_launching_replset.js b/jstests/multiVersion/genericSetFCVUsage/1_test_launching_replset.js index 69c110df30f..2d2fcbe85ae 100644 --- a/jstests/multiVersion/genericSetFCVUsage/1_test_launching_replset.js +++ b/jstests/multiVersion/genericSetFCVUsage/1_test_launching_replset.js @@ -45,42 +45,41 @@ for (let versions of [["last-lts", "latest"], ["last-continuous", "latest"]]) { rst.stopSet(); } -if (MongoRunner.areBinVersionsTheSame("last-continuous", "last-lts")) { - jsTest.log("Skipping test because 'last-continuous' == 'last-lts'"); +// TODO(SERVER-61100): Re-enable this test. +if (true) { + jsTestLog("Skipping test as it is currently disabled."); return; } for (let versions of [["last-lts", "last-continuous"], ["last-continuous", "last-lts"]]) { jsTestLog("Testing mixed versions: " + tojson(versions)); - 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(); -} + 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."); -for (let versions of [["last-lts", "last-continuous"], ["last-continuous", "last-lts"]]) { - jsTestLog("Testing mixed versions: " + tojson(versions)); + 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()); + + assert.allBinVersions(versions, versionsFound); - 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(); } |
