Speed up network partition test

REJECT rather than DROP packets in network partition test.  This test
was already very slow and could get slower with the newly added
reconnection logic.
This commit is contained in:
Haavard Kvaalen 2021-02-20 14:53:05 +01:00
parent 641b1b249e
commit f96892d45c

View File

@ -577,13 +577,13 @@ def err_sync_user_privs_with_materialize_mysql_database(clickhouse_node, mysql_n
mysql_node.query("DROP USER 'test'@'%'")
def restore_instance_mysql_connections(clickhouse_node, pm, action='DROP'):
def restore_instance_mysql_connections(clickhouse_node, pm, action='REJECT'):
pm._check_instance(clickhouse_node)
pm._delete_rule({'source': clickhouse_node.ip_address, 'destination_port': 3306, 'action': action})
pm._delete_rule({'destination': clickhouse_node.ip_address, 'source_port': 3306, 'action': action})
time.sleep(5)
def drop_instance_mysql_connections(clickhouse_node, pm, action='DROP'):
def drop_instance_mysql_connections(clickhouse_node, pm, action='REJECT'):
pm._check_instance(clickhouse_node)
pm._add_rule({'source': clickhouse_node.ip_address, 'destination_port': 3306, 'action': action})
pm._add_rule({'destination': clickhouse_node.ip_address, 'source_port': 3306, 'action': action})