summaryrefslogtreecommitdiff
path: root/buildscripts
diff options
context:
space:
mode:
authorAndrew Shuvalov <andrew.shuvalov@mongodb.com>2021-07-14 14:10:05 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-07-14 14:32:46 +0000
commit2fec2bd8bba95640b8606686a9e1bb44f1ec29e5 (patch)
tree656e27e3274eeb5f2e3308dcb9e40599cd474025 /buildscripts
parent1f0278ec2362f0796929cb6a0fa9c74072455831 (diff)
downloadmongo-2fec2bd8bba95640b8606686a9e1bb44f1ec29e5.tar.gz
SERVER-56489: New pass-through test with hello server-side delays
Diffstat (limited to 'buildscripts')
-rw-r--r--buildscripts/resmokeconfig/suites/sharding_hello_failures.yml44
-rw-r--r--buildscripts/resmokelib/testing/hooks/hello_failures.py42
2 files changed, 86 insertions, 0 deletions
diff --git a/buildscripts/resmokeconfig/suites/sharding_hello_failures.yml b/buildscripts/resmokeconfig/suites/sharding_hello_failures.yml
new file mode 100644
index 00000000000..fa3b5baab0a
--- /dev/null
+++ b/buildscripts/resmokeconfig/suites/sharding_hello_failures.yml
@@ -0,0 +1,44 @@
+test_kind: fsm_workload_test
+
+selector:
+ roots:
+ - jstests/concurrency/fsm_workloads/update_and_bulk_insert.js
+ - jstests/concurrency/fsm_workloads/update_array.js
+ - jstests/concurrency/fsm_workloads/update_check_index.js
+ - jstests/concurrency/fsm_workloads/update_inc.js
+ - jstests/concurrency/fsm_workloads/update_multifield.js
+ - jstests/concurrency/fsm_workloads/update_ordered_bulk_inc.js
+ - jstests/concurrency/fsm_workloads/update_rename.js
+ - jstests/concurrency/fsm_workloads/update_replace.js
+ - jstests/concurrency/fsm_workloads/update_simple.js
+ - jstests/concurrency/fsm_workloads/update_simple_noindex.js
+ - jstests/concurrency/fsm_workloads/update_where.js
+
+executor:
+ hooks:
+ - class: HelloDelays
+ fixture:
+ class: ShardedClusterFixture
+ mongos_options:
+ set_parameters:
+ enableTestCommands: 1
+ logComponentVerbosity:
+ verbosity: 0
+ command: 1
+ network:
+ verbosity: 1
+ asio: 2
+ mongod_options:
+ set_parameters:
+ enableTestCommands: 1
+ logComponentVerbosity:
+ verbosity: 0
+ command: 1
+ network:
+ verbosity: 1
+ asio: 2
+ enable_sharding:
+ - test
+ num_rs_nodes_per_shard: 3
+ shard_options:
+ all_nodes_electable: true
diff --git a/buildscripts/resmokelib/testing/hooks/hello_failures.py b/buildscripts/resmokelib/testing/hooks/hello_failures.py
new file mode 100644
index 00000000000..a4acdd63a6c
--- /dev/null
+++ b/buildscripts/resmokelib/testing/hooks/hello_failures.py
@@ -0,0 +1,42 @@
+"""Test hook that injects delays into server-side Hello Cmd handler."""
+
+from __future__ import absolute_import
+
+import os
+
+from buildscripts.resmokelib import errors
+from buildscripts.resmokelib import utils
+from buildscripts.resmokelib.testing.hooks import interface
+from buildscripts.resmokelib.testing.fixtures import replicaset
+from buildscripts.resmokelib.testing.fixtures import shardedcluster
+
+from . import interface
+from . import jsfile
+
+
+class HelloDelays(interface.Hook):
+ """Sets Hello fault injections."""
+
+ def __init__(self, hook_logger, fixture):
+ """Initialize HelloDelays."""
+ description = "Sets Hello fault injections"
+ interface.Hook.__init__(self, hook_logger, fixture, description)
+ self.js_filename = os.path.join("jstests", "hooks", "run_inject_hello_failures.js")
+ self.cleanup_js_filename = os.path.join("jstests", "hooks", "run_cleanup_hello_failures.js")
+ self.shell_options = None
+
+ def before_test(self, test, test_report):
+ """Each test will call this before it executes."""
+ print('before_test hook starts injecting Hello failures')
+ hook_test_case = jsfile.DynamicJSTestCase.create_before_test(
+ test.logger, test, self, self.js_filename, self.shell_options)
+ hook_test_case.configure(self.fixture)
+ hook_test_case.run_dynamic_test(test_report)
+
+ def after_test(self, test, test_report):
+ """Each test will call this after it executes."""
+ print('Cleanup hook is starting to remove Hello fail injections')
+ hook_test_case = jsfile.DynamicJSTestCase.create_after_test(
+ test.logger, test, self, self.cleanup_js_filename, self.shell_options)
+ hook_test_case.configure(self.fixture)
+ hook_test_case.run_dynamic_test(test_report)