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 2df4cb93acabf10bb0ff39c12030791b0947e719)
This commit is contained in:
parent
a227bc8053
commit
e9fef49e12
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user