mirror of
http://github.com/valkey-io/valkey
synced 2024-11-23 03:33:28 +00:00
Test: wait for actual startup in start_server.
start_server now uses return value from Tcl exec to get the server pid, however this introduces errors that depend from timing: a lot of the testing code base assumed the server to be actually up and running when server_start returns. So the old code that waits to see the pid in the log file was restored.
This commit is contained in:
parent
bd3a51615c
commit
fe0d371995
@ -240,6 +240,12 @@ proc start_server {options {code undefined}} {
|
||||
return
|
||||
}
|
||||
|
||||
# Wait for actual startup
|
||||
while {![info exists _pid]} {
|
||||
regexp {PID:\s(\d+)} [exec cat $stdout] _ _pid
|
||||
after 100
|
||||
}
|
||||
|
||||
# setup properties to be able to initialize a client object
|
||||
set host $::host
|
||||
set port $::port
|
||||
|
Loading…
Reference in New Issue
Block a user