summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Guo <robert.guo@mongodb.com>2021-07-22 07:35:13 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-07-22 14:50:12 +0000
commitbc5f93907101a0bc7dce0749bfd40d9bb83d73f0 (patch)
treea929f8b6a1258c5e50c62ae8ee282611a1fcee2f /src
parent73b4bcdabaddc1e2b5b59a19e0d7bae969a85669 (diff)
downloadmongo-bc5f93907101a0bc7dce0749bfd40d9bb83d73f0.tar.gz
SERVER-58172 run multiversion tests on master with 5.0 and disable incompatible tests
Diffstat (limited to 'src')
-rw-r--r--src/mongo/shell/replsettest.js2
-rw-r--r--src/mongo/shell/servers.js8
-rw-r--r--src/mongo/shell/shardingtest.js6
3 files changed, 7 insertions, 9 deletions
diff --git a/src/mongo/shell/replsettest.js b/src/mongo/shell/replsettest.js
index 2b84ea78486..2063a80dbe5 100644
--- a/src/mongo/shell/replsettest.js
+++ b/src/mongo/shell/replsettest.js
@@ -2849,7 +2849,7 @@ var ReplSetTest = function(opts) {
const rand = Random.rand();
// TODO SERVER-50389: Support last-continuous binary version with
// useRandomBinVersionsWithinReplicaSet.
- options.binVersion = rand < 0.5 ? "latest" : "last-lts";
+ options.binVersion = rand < 0.5 ? "latest" : "last-continuous";
}
print("Randomly assigned binary version: " + options.binVersion + " to node: " + n);
}
diff --git a/src/mongo/shell/servers.js b/src/mongo/shell/servers.js
index f3692f0c486..e67682480a3 100644
--- a/src/mongo/shell/servers.js
+++ b/src/mongo/shell/servers.js
@@ -211,10 +211,8 @@ var extractMajorVersionFromVersionString = function(versionString) {
// versions being checked in 'verify_versions_test.js' to verify it is susbstituted correctly.
MongoRunner.binVersionSubs = [
new MongoRunner.VersionSub("latest", shellVersion()),
- new MongoRunner.VersionSub(extractMajorVersionFromVersionString(shellVersion()),
- shellVersion()),
// To-be-updated when we branch for the next release.
- new MongoRunner.VersionSub("last-continuous", "4.9"),
+ new MongoRunner.VersionSub("last-continuous", "5.0"),
// To be updated when we branch for the next LTS release.
new MongoRunner.VersionSub("last-lts", "4.4")
];
@@ -252,7 +250,6 @@ MongoRunner.areBinVersionsTheSame = function(versionA, versionB) {
// Check for invalid version strings first.
convertVersionStringToArray(MongoRunner.getBinVersionFor(versionA));
convertVersionStringToArray(MongoRunner.getBinVersionFor(versionB));
-
try {
return (0 === MongoRunner.compareBinVersions(versionA, versionB));
} catch (err) {
@@ -295,7 +292,8 @@ MongoRunner.compareBinVersions = function(versionA, versionB) {
var numA = parseInt(elementA);
var numB = parseInt(elementB);
- assert(!isNaN(numA) && !isNaN(numB), "Cannot compare non-equal non-numeric versions.");
+ assert(!isNaN(numA) && !isNaN(numB),
+ `Cannot compare non-equal non-numeric versions. ${elementA}, ${elementB}`);
if (numA > numB) {
return 1;
diff --git a/src/mongo/shell/shardingtest.js b/src/mongo/shell/shardingtest.js
index 8318dc9f56d..18924ffe717 100644
--- a/src/mongo/shell/shardingtest.js
+++ b/src/mongo/shell/shardingtest.js
@@ -957,7 +957,7 @@ var ShardingTest = function(params) {
// as well, because it does not update mongosOptions.binVersion.
// TODO SERVER-50389: Differentiate between 'last-lts' and 'last-continuous' when
// last-continuous is supported with shardMixedBinVersions.
- if ((MongoRunner.areBinVersionsTheSame(binVersion, "last-lts") &&
+ if ((MongoRunner.areBinVersionsTheSame(binVersion, "last-continuous") &&
jsTestOptions().shardMixedBinVersions) ||
(jsTestOptions().mongosBinVersion &&
MongoRunner.areBinVersionsTheSame(binVersion, jsTestOptions().mongosBinVersion))) {
@@ -1229,13 +1229,13 @@ var ShardingTest = function(params) {
// If the test doesn't depend on specific shard binVersions, create a mixed
// version
// shard cluster that randomly assigns shard binVersions, half "latest" and half
- // "last-lts".
+ // "last-continuous".
// TODO SERVER-50389: Support last-continuous binary version with
// shardMixedBinVersions.
if (!otherParams.shardOptions.binVersion) {
Random.setRandomSeed();
otherParams.shardOptions.binVersion =
- MongoRunner.versionIterator(["latest", "last-lts"], true);
+ MongoRunner.versionIterator(["latest", "last-continuous"], true);
}
}