You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by br...@apache.org on 2022/06/16 14:04:56 UTC
[cassandra-dtest] branch trunk updated: add test for counter writes with a node down
This is an automated email from the ASF dual-hosted git repository.
brandonwilliams 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 026ff1cb add test for counter writes with a node down
026ff1cb is described below
commit 026ff1cb3880740088f6e0e3ba230838361b4814
Author: Brandon Williams <br...@apache.org>
AuthorDate: Mon Jun 6 14:16:41 2022 -0500
add test for counter writes with a node down
Patch by brandonwilliams; reviewed by adelapena for CASSANDRA-17411
---
counter_test.py | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/counter_test.py b/counter_test.py
index a4f80ef8..103db9e4 100644
--- a/counter_test.py
+++ b/counter_test.py
@@ -417,3 +417,28 @@ class TestCounters(Tester):
for idx in range(0, 5):
row = list(session.execute("SELECT data from counter_cs where key = {k}".format(k=idx)))
assert rows_to_list(row)[0][0] == 5
+
+ def test_counter_node_down(self):
+ """
+ @jira_ticket CASSANDRA-17411
+ """
+ cluster = self.cluster
+ cluster.populate(3).start()
+ node1, node2, node3 = cluster.nodelist()
+ session = self.patient_cql_connection(node1)
+ create_ks(session, 'counter_tests', 3)
+
+ session.execute("""
+ CREATE TABLE IF NOT EXISTS counter_cs (
+ key text PRIMARY KEY,
+ count counter
+ )
+ """)
+
+ node2.stop(gently=False, wait_other_notice=True)
+
+ for _ in range(0, 20):
+ session.execute("UPDATE counter_cs SET count = count + 1 WHERE key = 'test'")
+
+ row = list(session.execute("SELECT count from counter_cs where key = 'test'"))
+ assert len(row) == 1
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org