Skip to content
Permalink
Browse files
Wait on notifications to propagate
Patch by Berenguer Blasi, reviewed by brandonwilliams for
CASSANDRA-15912
  • Loading branch information
bereng authored and driftx committed Jul 8, 2020
1 parent f5bc21c commit 30806d425e2271b982bf8facb174341b6b4193ed
Showing 1 changed file with 6 additions and 1 deletion.
@@ -229,14 +229,19 @@ def test_restart_node_localhost(self):
waiter = NotificationWaiter(self, node1, ["STATUS_CHANGE", "TOPOLOGY_CHANGE"])

# restart node 2
version = self.cluster.cassandra_version()
if version >= '4.0':
# >=4.0 we wait for the NEW_NODE and UP notifications to reach us
waiter.wait_for_notifications(timeout=30.0, num_notifications=2)
waiter.clear_notifications()

logger.debug("Restarting second node...")
node2.stop(wait_other_notice=True)
node2.start(wait_other_notice=True)

# check that node1 did not send UP or DOWN notification for node2
logger.debug("Waiting for notifications from {}".format(waiter.address,))
notifications = waiter.wait_for_notifications(timeout=30.0, num_notifications=2)
version = self.cluster.cassandra_version()

if version >= '4.0':
# CASSANDRA-15677 Post 4.0 we'll get the notifications. Check that they are for the right node.

0 comments on commit 30806d4

Please sign in to comment.