This is an automated email from the ASF dual-hosted git repository.

samt pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-dtest.git

commit a99a23dfc1b57851c3b964adbb3105ea69a83def
Author: Sam Tunnicliffe <[email protected]>
AuthorDate: Thu Nov 2 16:53:15 2023 +0000

    [CEP-21] Add TCM-ised byteman script for materialized_views_test
---
 byteman/merge_schema_failure_5_1.btm | 12 ++++++++++++
 materialized_views_test.py           |  3 ++-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/byteman/merge_schema_failure_5_1.btm 
b/byteman/merge_schema_failure_5_1.btm
new file mode 100644
index 00000000..78eb428b
--- /dev/null
+++ b/byteman/merge_schema_failure_5_1.btm
@@ -0,0 +1,12 @@
+#
+# Inject node failure on merge schema exit.
+#
+RULE inject node failure on merge schema exit
+CLASS org.apache.cassandra.tcm.listeners.SchemaListener
+METHOD notifyPostCommit
+AT EXIT
+# set flag to only run this rule once.
+IF TRUE
+DO
+   System.exit(0)
+ENDRULE
diff --git a/materialized_views_test.py b/materialized_views_test.py
index 8a9b836d..b5863ffb 100644
--- a/materialized_views_test.py
+++ b/materialized_views_test.py
@@ -987,7 +987,8 @@ class TestMaterializedViews(Tester):
 
         # Rename a column with an injected byteman rule to kill the node after 
the first schema update
         self.fixture_dtest_setup.allow_log_errors = True
-        script_version = '4x' if self.cluster.version() >= '4' else '3x'
+
+        script_version = '5_1' if self.cluster.version() >= 
LooseVersion('5.1') else '4x' if self.cluster.version() >= '4' else '3x'
         
node.byteman_submit([mk_bman_path('merge_schema_failure_{}.btm'.format(script_version))])
         with pytest.raises(NoHostAvailable):
             session.execute("ALTER TABLE users RENAME username TO user")


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to