mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-17 20:02:05 +00:00
* Fixing race condition between starting tail -f
command and the file removal that follows.
This commit is contained in:
parent
ad4c069b4e
commit
e361f3120f
@ -153,7 +153,10 @@ def add_config(config, timeout=300, restart=False, modify=False):
|
||||
|
||||
with node.cluster.shell(node.name) as bash:
|
||||
bash.expect(bash.prompt)
|
||||
bash.send("tail -n 0 -f /var/log/clickhouse-server/clickhouse-server.log")
|
||||
bash.send("tail -v -n 0 -f /var/log/clickhouse-server/clickhouse-server.log")
|
||||
# make sure tail process is launched and started to follow the file
|
||||
bash.expect("<==")
|
||||
bash.expect("\n")
|
||||
|
||||
with When("I add the config", description=config.path):
|
||||
command = f"cat <<HEREDOC > {config.path}\n{config.content}\nHEREDOC"
|
||||
@ -170,7 +173,10 @@ def add_config(config, timeout=300, restart=False, modify=False):
|
||||
with Finally(f"I remove {config.name}"):
|
||||
with node.cluster.shell(node.name) as bash:
|
||||
bash.expect(bash.prompt)
|
||||
bash.send("tail -n 0 -f /var/log/clickhouse-server/clickhouse-server.log")
|
||||
bash.send("tail -v -n 0 -f /var/log/clickhouse-server/clickhouse-server.log")
|
||||
# make sure tail process is launched and started to follow the file
|
||||
bash.expect("<==")
|
||||
bash.expect("\n")
|
||||
|
||||
with By("removing the config file", description=config.path):
|
||||
node.command(f"rm -rf {config.path}", exitcode=0)
|
||||
|
Loading…
Reference in New Issue
Block a user