mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 08:02:02 +00:00
Merge pull request #44859 from ClickHouse/wait-zk-process-stopped
Wait for ZK process to stop in tests using snapshot
This commit is contained in:
commit
e68b98aac3
@ -29,6 +29,11 @@ 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)
|
||||
|
||||
|
||||
def clear_zookeeper(node):
|
||||
|
@ -24,6 +24,11 @@ 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)
|
||||
|
||||
|
||||
def clear_zookeeper():
|
||||
|
Loading…
Reference in New Issue
Block a user