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

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


The following commit(s) were added to refs/heads/trunk by this push:
     new d862a38a Align tests with CASSANDRA-18555
d862a38a is described below

commit d862a38a7ca11f419a84adb98a355b58b0f5f3a1
Author: Stefan Miklosovic <[email protected]>
AuthorDate: Fri Jun 16 18:11:33 2023 +0200

    Align tests with CASSANDRA-18555
    
    patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-18555
---
 .gitignore       |  5 +++++
 topology_test.py | 10 ++++++++++
 2 files changed, 15 insertions(+)

diff --git a/.gitignore b/.gitignore
index 2b6fb271..bfe340cb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,3 +11,8 @@ upgrade
 html/
 doxygen/doxypy-0.4.2/
 .pytest_cache/
+
+bin/
+lib/
+pyvenv.cfg
+src/
diff --git a/topology_test.py b/topology_test.py
index 9feae9df..d32cb169 100644
--- a/topology_test.py
+++ b/topology_test.py
@@ -443,6 +443,8 @@ class TestTopology(Tester):
         cluster.populate(3).start()
 
         node1, node2 = cluster.nodelist()[0:2]
+        session = self.patient_cql_connection(node1)
+        session.execute("ALTER KEYSPACE system_distributed WITH REPLICATION = 
{'class':'SimpleStrategy', 'replication_factor':'2'};")
 
         t = DecommissionInParallel(node1)
         t.start()
@@ -476,6 +478,12 @@ class TestTopology(Tester):
         @jira_ticket CASSANDRA-12510
         @expected_errors ToolError when # nodes will drop below configured 
replicas in NTS/SimpleStrategy
         """
+
+        # we need to ignore this error log message which is emitted during the 
test 
+        # because dtest framework which reads the logs would evaluate the node 
is errorneous and 
+        # it would terminate it prematurely
+        self.fixture_dtest_setup.ignore_log_patterns = (r'.*Not enough live 
nodes to maintain replication factor*')
+
         cluster = self.cluster
         cluster.populate([2, 2]).start()
         node1, node2, node3, node4 = self.cluster.nodelist()
@@ -492,6 +500,8 @@ class TestTopology(Tester):
         with pytest.raises(ToolError):
             node4.nodetool('decommission')
 
+        self.fixture_dtest_setup.ignore_log_patterns = ()
+
         node4.nodetool('decommission --force')
         decommissioned = node4.watch_log_for("DECOMMISSIONED", timeout=120)
         assert decommissioned, "Node failed to decommission when passed 
--force"


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

Reply via email to