summaryrefslogtreecommitdiff
path: root/buildscripts
diff options
context:
space:
mode:
authorMaria van Keulen <maria@mongodb.com>2019-05-23 14:28:28 -0400
committerMaria van Keulen <maria@mongodb.com>2019-05-31 15:27:06 -0400
commitb8c122532766ca47666945f7d8b7b1e19332f03f (patch)
tree05ec6ff4192e88663511acdad24050d9977407a9 /buildscripts
parent8cabc69905b649a069f1124cf02e0cf46ff86a58 (diff)
downloadmongo-b8c122532766ca47666945f7d8b7b1e19332f03f.tar.gz
SERVER-41241 Add testing tasks with Flow Control aggressively engaged
Diffstat (limited to 'buildscripts')
-rw-r--r--buildscripts/resmokeconfig/suites/jstestfuzz_replication_continuous_stepdown.yml44
-rw-r--r--buildscripts/resmokelib/config.py4
-rw-r--r--buildscripts/resmokelib/core/programs.py6
-rw-r--r--buildscripts/resmokelib/parser.py5
4 files changed, 59 insertions, 0 deletions
diff --git a/buildscripts/resmokeconfig/suites/jstestfuzz_replication_continuous_stepdown.yml b/buildscripts/resmokeconfig/suites/jstestfuzz_replication_continuous_stepdown.yml
new file mode 100644
index 00000000000..fd032bd7afa
--- /dev/null
+++ b/buildscripts/resmokeconfig/suites/jstestfuzz_replication_continuous_stepdown.yml
@@ -0,0 +1,44 @@
+test_kind: js_test
+
+selector:
+ roots:
+ - jstestfuzz/out/*.js
+
+executor:
+ archive:
+ hooks:
+ - CheckReplDBHash
+ - ValidateCollections
+ config:
+ shell_options:
+ readMode: commands
+ hooks:
+ - class: ContinuousStepdown
+ # The CheckReplDBHash hook waits until all operations have replicated to and have been applied
+ # on the secondaries, so we run the ValidateCollections hook after it to ensure we're
+ # validating the entire contents of the collection.
+ - class: CheckReplDBHash
+ shell_options:
+ global_vars:
+ TestData:
+ skipValidationOnInvalidViewDefinitions: true
+ - class: ValidateCollections
+ shell_options:
+ global_vars:
+ TestData:
+ skipValidationOnInvalidViewDefinitions: true
+ forceValidationWithFeatureCompatibilityVersion: "4.2"
+ fixture:
+ class: ReplicaSetFixture
+ mongod_options:
+ set_parameters:
+ disableLogicalSessionCacheRefresh: false
+ enableElectionHandoff: 0
+ enableTestCommands: 1
+ transactionLifetimeLimitSeconds: 1
+ writePeriodicNoops: 1
+ all_nodes_electable: true
+ num_nodes: 3
+ replset_config_options:
+ settings:
+ catchUpTimeoutMillis: 0
diff --git a/buildscripts/resmokelib/config.py b/buildscripts/resmokelib/config.py
index 4004823845e..729be502a8f 100644
--- a/buildscripts/resmokelib/config.py
+++ b/buildscripts/resmokelib/config.py
@@ -55,6 +55,7 @@ DEFAULTS = {
"dry_run": None,
"exclude_with_any_tags": None,
"flow_control": None,
+ "flow_control_tickets": None,
"genny_executable": None,
"include_with_any_tags": None,
"jobs": 1,
@@ -377,6 +378,9 @@ MAJORITY_READ_CONCERN = None
# None, the server's default will determine whether flow control is enabled.
FLOW_CONTROL = None
+# If set, it ensures Flow Control only ever assigns this number of tickets in one second.
+FLOW_CONTROL_TICKETS = None
+
# If set, then all mongod's started by resmoke.py and by the mongo shell will use the specified
# storage engine.
STORAGE_ENGINE = None
diff --git a/buildscripts/resmokelib/core/programs.py b/buildscripts/resmokelib/core/programs.py
index ba12be817fe..d5c7e49b3f9 100644
--- a/buildscripts/resmokelib/core/programs.py
+++ b/buildscripts/resmokelib/core/programs.py
@@ -122,6 +122,12 @@ def mongod_program( # pylint: disable=too-many-branches
if "enableFlowControl" not in suite_set_parameters and config.FLOW_CONTROL is not None:
suite_set_parameters["enableFlowControl"] = (config.FLOW_CONTROL == "on")
+ if ("failpoint.flowControlTicketOverride" not in suite_set_parameters
+ and config.FLOW_CONTROL_TICKETS is not None):
+ suite_set_parameters["failpoint.flowControlTicketOverride"] = {
+ "mode": "alwaysOn", "data": {"numTickets": config.FLOW_CONTROL_TICKETS}
+ }
+
_apply_set_parameters(args, suite_set_parameters)
shortcut_opts = {
diff --git a/buildscripts/resmokelib/parser.py b/buildscripts/resmokelib/parser.py
index ebb0ebd1a0b..d37bb06108f 100644
--- a/buildscripts/resmokelib/parser.py
+++ b/buildscripts/resmokelib/parser.py
@@ -252,6 +252,10 @@ def _make_parser(): # pylint: disable=too-many-statements
choices=("on",
"off"), metavar="ON|OFF", help=("Enable or disable flow control."))
+ parser.add_option("--flowControlTicketOverride", type="int", action="store",
+ dest="flow_control_tickets", metavar="TICKET_OVERRIDE",
+ help=("Number of tickets available for flow control."))
+
parser.add_option("--storageEngine", dest="storage_engine", metavar="ENGINE",
help="The storage engine used by dbtests and jstests.")
@@ -570,6 +574,7 @@ def _update_config_vars(values): # pylint: disable=too-many-statements
utils.default_if_none(_tags_from_list(config.pop("exclude_with_any_tags")), []))
_config.FAIL_FAST = not config.pop("continue_on_failure")
_config.FLOW_CONTROL = config.pop("flow_control")
+ _config.FLOW_CONTROL_TICKETS = config.pop("flow_control_tickets")
_config.INCLUDE_WITH_ANY_TAGS = _tags_from_list(config.pop("include_with_any_tags"))
_config.GENNY_EXECUTABLE = _expand_user(config.pop("genny_executable"))
_config.JOBS = config.pop("jobs")