Commit e9fef49e authored by Yossi Gottlieb's avatar Yossi Gottlieb Committed by Oran Agra
Browse files

Tests: fix unmonitored servers. (#7756)

There is an inherent race condition in port allocation for spawned
servers. If a server fails to start because a port is taken, a new port
is allocated. This fixes a problem where the logs are not truncated and
as a result a large number of unmonitored servers are started.

(cherry picked from commit 2df4cb93)
parent a227bc80
......@@ -383,6 +383,11 @@ proc start_server {options {code undefined}} {
dict set config port $port
}
create_server_config_file $config_file $config
# Truncate log so wait_server_started will not be looking at
# output of the failed server.
close [open $stdout "w"]
continue; # Try again
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment