mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
Add timeout for ZK stop
This commit is contained in:
parent
4ccd828a44
commit
a88171b594
@ -29,7 +29,10 @@ def start_zookeeper(node):
|
||||
|
||||
def stop_zookeeper(node):
|
||||
node.exec_in_container(["bash", "-c", "/opt/zookeeper/bin/zkServer.sh stop"])
|
||||
timeout = time.time() + 60
|
||||
while node.get_process_pid("zookeeper") != None:
|
||||
if time.time() > timeout:
|
||||
raise Exception("Failed to stop ZooKeeper in 60 secs")
|
||||
time.sleep(0.2)
|
||||
|
||||
|
||||
|
@ -24,7 +24,10 @@ def start_zookeeper():
|
||||
|
||||
def stop_zookeeper():
|
||||
node.exec_in_container(["bash", "-c", "/opt/zookeeper/bin/zkServer.sh stop"])
|
||||
timeout = time.time() + 60
|
||||
while node.get_process_pid("zookeeper") != None:
|
||||
if time.time() > timeout:
|
||||
raise Exception("Failed to stop ZooKeeper in 60 secs")
|
||||
time.sleep(0.2)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user