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:
antirez 2014-11-28 11:49:26 +01:00
parent bd3a51615c
commit fe0d371995

View File

@ -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