You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by al...@apache.org on 2019/06/12 14:55:44 UTC
[cassandra-dtest] 01/04: remove redundant
internode_messaging_test.py
This is an automated email from the ASF dual-hosted git repository.
aleksey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cassandra-dtest.git
commit d520f7edf02a39cfcc6a016eb4c80fc3e0e74dc1
Author: Benedict Elliott Smith <be...@apple.com>
AuthorDate: Mon Mar 18 18:14:15 2019 +0000
remove redundant internode_messaging_test.py
---
byteman/corrupt_internode_messages_gossip.btm | 17 ----------
internode_messaging_test.py | 48 ---------------------------
2 files changed, 65 deletions(-)
diff --git a/byteman/corrupt_internode_messages_gossip.btm b/byteman/corrupt_internode_messages_gossip.btm
deleted file mode 100644
index 66e4fe2..0000000
--- a/byteman/corrupt_internode_messages_gossip.btm
+++ /dev/null
@@ -1,17 +0,0 @@
-#
-# corrupt the first gossip ACK message. we corrupt it on the way out,
-# in serialize(), so it fails on deserializing. However, we also need
-# to hack the serializedSize().
-#
-
-RULE corrupt the first gossip ACK message
-CLASS org.apache.cassandra.gms.GossipDigestAckSerializer
-METHOD serialize(org.apache.cassandra.gms.GossipDigestAck, org.apache.cassandra.io.util.DataOutputPlus, int)
-AT ENTRY
-# set flag to only run this rule once.
-IF NOT flagged("done")
-DO
- flag("done");
- $2.writeInt(-1);
-ENDRULE
-
diff --git a/internode_messaging_test.py b/internode_messaging_test.py
deleted file mode 100644
index 3914210..0000000
--- a/internode_messaging_test.py
+++ /dev/null
@@ -1,48 +0,0 @@
-import pytest
-import logging
-import time
-
-from dtest import Tester
-
-since = pytest.mark.since
-logger = logging.getLogger(__name__)
-
-_LOG_ERR_ILLEGAL_CAPACITY = "Caused by: java.lang.IllegalArgumentException: Illegal Capacity: -1"
-
-
-@since('4.0')
-class TestInternodeMessaging(Tester):
-
- @pytest.fixture(autouse=True)
- def fixture_add_additional_log_patterns(self, fixture_dtest_setup):
- fixture_dtest_setup.ignore_log_patterns = (
- r'Illegal Capacity: -1',
- r'reported message size'
- )
-
- def test_message_corruption(self):
- """
- @jira_ticket CASSANDRA-14574
-
- Use byteman to corrupt an outgoing gossip ACK message, check that the recipient fails *once* on the message
- but does not spin out of control trying to process the rest of the bytes in the buffer.
- Then make sure normal messaging can occur after a reconnect (on a different socket, of course).
- """
- cluster = self.cluster
- cluster.populate(2, install_byteman=True)
- cluster.start(wait_other_notice=True)
-
- node1, node2 = cluster.nodelist()
- node1_log_mark = node1.mark_log()
- node2_log_mark = node2.mark_log()
-
- node2.byteman_submit(['./byteman/corrupt_internode_messages_gossip.btm'])
-
- # wait for the deserialization error to happen on node1
- time.sleep(10)
- assert len(node1.grep_log(_LOG_ERR_ILLEGAL_CAPACITY, from_mark=node1_log_mark)) == 1
-
- # now, make sure node2 reconnects (and continues gossiping).
- # node.watch_log_for() will time out if it cannot find the log entry
- assert node2.grep_log(r'successfully connected to 127.0.0.1:7000 \(GOSSIP\)',
- from_mark=node2_log_mark, filename='debug.log')
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org