test_move_single_node_localhost | Failure | AssertionError: [{'address': ('127.0.0.1', 9046), 'change_type': 'NEW_NODE'}, {'address': ('127.0.0.1', 9042), 'change_type': 'MOVED_NODE'}]
assert 1 == 2
+1
-2
self = <pushed_notifications_test.TestPushedNotifications object at 0x7fd0b859f820>
@pytest.mark.no_vnodes
def test_move_single_node_localhost(self):
"""
Test that we don't get NODE_MOVED notifications from nodes other than the local one,
when rpc_address is set to localhost (127.0.0.1) Pre 4.0.
Test that we get NODE_MOVED notifications from nodes other than the local one,
when rpc_address is set to localhost (127.0.0.1) Post 4.0.
@jira_ticket CASSANDRA-10052
@jira_ticket CASSANDRA-15677
To set-up this test we override the rpc_address to "localhost (127.0.0.1)" for all nodes, and
therefore we must change the rpc port or else processes won't start.
"""
cluster = self.cluster
cluster.populate(3)
self.change_rpc_address_to_localhost()
cluster.start()
waiters = [NotificationWaiter(self, node, ["TOPOLOGY_CHANGE"])
for node in list(self.cluster.nodes.values())]
# The first node sends NEW_NODE for the other 2 nodes during startup, in case they are
# late due to network delays let's block a bit longer
logger.debug("Waiting for unwanted notifications...")
waiters[0].wait_for_notifications(timeout=30, num_notifications=2)
waiters[0].clear_notifications()
logger.debug("Issuing move command....")
node1 = list(self.cluster.nodes.values())[0]
node1.move("123")
version = self.cluster.cassandra_version()
for waiter in waiters:
logger.debug("Waiting for notification from {}".format(waiter.address,))
notifications = waiter.wait_for_notifications(30.0)
if version >= '4.0':
# CASSANDRA-15677 Post 4.0 we'll get the notifications. Check that they are for the right node.
> assert 1 == len(notifications), notifications
E AssertionError: [{'address': ('127.0.0.1', 9046), 'change_type': 'NEW_NODE'}, {'address': ('127.0.0.1', 9042), 'change_type': 'MOVED_NODE'}]
E assert 1 == 2
E +1
E -2
pushed_notifications_test.py:159: AssertionError | 97.543 |