mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
Fix one more test
This commit is contained in:
parent
e704140d07
commit
ff6cc14df3
@ -36,6 +36,16 @@ def start(node):
|
||||
node.start_clickhouse()
|
||||
|
||||
|
||||
def delete_with_retry(node_name, path):
|
||||
for _ in range(30):
|
||||
try:
|
||||
get_fake_zk(node_name).delete(path)
|
||||
return
|
||||
except:
|
||||
time.sleep(0.5)
|
||||
raise Exception(f"Cannot delete {path} from node {node_name}")
|
||||
|
||||
|
||||
def test_start_offline(started_cluster):
|
||||
p = Pool(3)
|
||||
try:
|
||||
@ -57,7 +67,7 @@ def test_start_offline(started_cluster):
|
||||
|
||||
finally:
|
||||
p.map(start, [node1, node2, node3])
|
||||
get_fake_zk("node1").delete("/test_alive")
|
||||
delete_with_retry("node1", "/test_alive")
|
||||
|
||||
|
||||
def test_start_non_existing(started_cluster):
|
||||
@ -82,7 +92,7 @@ def test_start_non_existing(started_cluster):
|
||||
node1.replace_in_config('/etc/clickhouse-server/config.d/enable_keeper1.xml', 'non_existing_node', 'node3')
|
||||
node2.replace_in_config('/etc/clickhouse-server/config.d/enable_keeper2.xml', 'non_existing_node', 'node3')
|
||||
p.map(start, [node1, node2, node3])
|
||||
node2_zk.delete("/test_non_exising")
|
||||
delete_with_retry("node2", "/test_non_exising")
|
||||
|
||||
|
||||
def test_restart_third_node(started_cluster):
|
||||
|
Loading…
Reference in New Issue
Block a user