diff options
author | Amirsaman Memaripour <amirsaman.memaripour@mongodb.com> | 2020-06-08 14:34:05 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-08-19 02:10:48 +0000 |
commit | 7df217f9dbc01d06224f02e4bc12ec813770d3c9 (patch) | |
tree | 00a22b6110243b7eb0ef33202a8906d0c649317e | |
parent | a81703ed333939ffa67b3c19786329c8b101dc8b (diff) | |
download | mongo-7df217f9dbc01d06224f02e4bc12ec813770d3c9.tar.gz |
SERVER-46726 Make multiversion tests work with the new parameter
This patch addresses issues concerning running mongos in multiversion tests.
(cherry picked from commit 87de9a0cb1e898d7b49c04558e60c40103ee1d8f)
4 files changed, 14 insertions, 14 deletions
diff --git a/buildscripts/resmokelib/core/programs.py b/buildscripts/resmokelib/core/programs.py index 0634ecbd3ae..69937329b47 100644 --- a/buildscripts/resmokelib/core/programs.py +++ b/buildscripts/resmokelib/core/programs.py @@ -10,6 +10,7 @@ import stat import sys from buildscripts.resmokelib.multiversionconstants import LAST_STABLE_MONGOD_BINARY +from buildscripts.resmokelib.multiversionconstants import LAST_STABLE_MONGOS_BINARY from . import jasper_process from . import process from .. import config @@ -194,7 +195,7 @@ def mongod_program( # pylint: disable=too-many-branches,too-many-statements executable != LAST_STABLE_MONGOD_BINARY: suite_set_parameters["assertStableTimestampEqualsAppliedThroughOnRecovery"] = True - # TODO(SERVER-46726): Only keep the else block once SERVER-46726 is backported to v4.4 + # TODO(SERVER-48645): Only keep the else block once v4.4 is not longer the last stable version if executable == LAST_STABLE_MONGOD_BINARY: suite_set_parameters.setdefault("enableTestCommands", True) else: @@ -277,8 +278,8 @@ def mongos_program(logger, executable=None, process_kwargs=None, **kwargs): if "logComponentVerbosity" not in suite_set_parameters: suite_set_parameters["logComponentVerbosity"] = default_mongos_log_component_verbosity() - # TODO(SERVER-46726): Only keep the else block once SERVER-46726 is backported to v4.4 - if executable == LAST_STABLE_MONGOD_BINARY: + # TODO(SERVER-48645): Only keep the else block once v4.4 is not longer the last stable version + if executable == LAST_STABLE_MONGOS_BINARY: suite_set_parameters.setdefault("enableTestCommands", True) else: _add_testing_set_parameters(suite_set_parameters) diff --git a/buildscripts/resmokelib/multiversionconstants.py b/buildscripts/resmokelib/multiversionconstants.py index 171af25a1f4..fc655e2d365 100644 --- a/buildscripts/resmokelib/multiversionconstants.py +++ b/buildscripts/resmokelib/multiversionconstants.py @@ -1,9 +1,10 @@ """FCV and Server binary version constants used for multiversion testing.""" -LAST_STABLE_MONGO_BINARY = "mongo-4.2" -LAST_STABLE_MONGOD_BINARY = "mongod-4.2" -REQUIRES_FCV_TAG = "requires_fcv_44" - +LAST_STABLE_BIN_VERSION = "4.2" LAST_STABLE_FCV = "4.2" LATEST_FCV = "4.4" -LAST_STABLE_BIN_VERSION = "4.2" + +LAST_STABLE_MONGO_BINARY = "mongo-" + LAST_STABLE_BIN_VERSION +LAST_STABLE_MONGOD_BINARY = "mongod-" + LAST_STABLE_BIN_VERSION +LAST_STABLE_MONGOS_BINARY = "mongos-" + LAST_STABLE_BIN_VERSION +REQUIRES_FCV_TAG = "requires_fcv_44" diff --git a/buildscripts/resmokelib/testing/fixtures/replicaset.py b/buildscripts/resmokelib/testing/fixtures/replicaset.py index 5de9996de1c..d9ece3a084b 100644 --- a/buildscripts/resmokelib/testing/fixtures/replicaset.py +++ b/buildscripts/resmokelib/testing/fixtures/replicaset.py @@ -14,6 +14,7 @@ from . import standalone from ... import config from ... import errors from ... import utils +from ...multiversionconstants import LAST_STABLE_MONGOD_BINARY class ReplicaSetFixture(interface.ReplFixture): # pylint: disable=too-many-instance-attributes @@ -58,13 +59,11 @@ class ReplicaSetFixture(interface.ReplFixture): # pylint: disable=too-many-inst latest_mongod = mongod_executable # The last-stable binary is currently expected to live in '/data/multiversion', which is # part of the PATH. - last_stable_mongod = config.DEFAULT_MONGOD_EXECUTABLE + "-" \ - + ReplicaSetFixture._LAST_STABLE_BIN_VERSION is_config_svr = "configsvr" in self.replset_config_options and self.replset_config_options[ "configsvr"] if not is_config_svr: self.mixed_bin_versions = [ - latest_mongod if (x == "new") else last_stable_mongod + latest_mongod if (x == "new") else LAST_STABLE_MONGOD_BINARY for x in self.mixed_bin_versions ] else: diff --git a/buildscripts/resmokelib/testing/fixtures/shardedcluster.py b/buildscripts/resmokelib/testing/fixtures/shardedcluster.py index 40fadef17ad..1b3e6628ea7 100644 --- a/buildscripts/resmokelib/testing/fixtures/shardedcluster.py +++ b/buildscripts/resmokelib/testing/fixtures/shardedcluster.py @@ -14,6 +14,7 @@ from ... import core from ... import errors from ... import utils from ...utils import registry +from ...multiversionconstants import LAST_STABLE_MONGOS_BINARY class ShardedClusterFixture(interface.Fixture): # pylint: disable=too-many-instance-attributes @@ -336,9 +337,7 @@ class ShardedClusterFixture(interface.Fixture): # pylint: disable=too-many-inst # The last-stable binary is currently expected to live in '/data/multiversion', which is # part of the PATH. - last_stable_executable = config.DEFAULT_MONGOS_EXECUTABLE + "-" \ - + ShardedClusterFixture._LAST_STABLE_BIN_VERSION - mongos_executable = self.mongos_executable if self.mixed_bin_versions is None else last_stable_executable + mongos_executable = self.mongos_executable if self.mixed_bin_versions is None else LAST_STABLE_MONGOS_BINARY return _MongoSFixture(mongos_logger, self.job_num, dbpath_prefix=self._dbpath_prefix, mongos_executable=mongos_executable, mongos_options=mongos_options) |