summaryrefslogtreecommitdiff
path: root/buildscripts
diff options
context:
space:
mode:
authorAndrew Shuvalov <andrew.shuvalov@mongodb.com>2021-07-02 18:40:17 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-07-02 18:59:41 +0000
commit2a990abe6ec4361f2cfc46379a4120fd20a62764 (patch)
tree3f8c024d20613ec165843ee74e2942f57a058901 /buildscripts
parente449bf28ca66cc5754aa59df56e60a71d6811340 (diff)
downloadmongo-2a990abe6ec4361f2cfc46379a4120fd20a62764.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.yml45
-rw-r--r--buildscripts/resmokelib/testing/hooks/hello_failures.py42
2 files changed, 87 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..06b4a3d170d
--- /dev/null
+++ b/buildscripts/resmokeconfig/suites/sharding_hello_failures.yml
@@ -0,0 +1,45 @@
+test_kind: fsm_workload_test
+
+selector:
+ roots:
+ - jstests/concurrency/fsm_workloads/explain_update.js
+ - jstests/concurrency/fsm_workloads/update_and_bulk_insert.js
+ - jstests/concurrency/fsm_workloads/update_array_noindex.js
+ - jstests/concurrency/fsm_workloads/update_check_index.js
+ - jstests/concurrency/fsm_workloads/update_inc.js
+ - jstests/concurrency/fsm_workloads/update_inc_capped.js
+ - jstests/concurrency/fsm_workloads/update_multifield_multiupdate_noindex.js
+ - jstests/concurrency/fsm_workloads/update_multifield_noindex.js
+ - jstests/concurrency/fsm_workloads/update_rename.js
+ - jstests/concurrency/fsm_workloads/update_rename_noindex.js
+ - jstests/concurrency/fsm_workloads/update_replace_noindex.js
+ - jstests/concurrency/fsm_workloads/update_simple_noindex.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)