X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/5171777bf112a6a930c4750949037ce741f3bf28..0a546fc01758f9a9f8b2113764c2cf963df6ef20:/tests/support/server.tcl diff --git a/tests/support/server.tcl b/tests/support/server.tcl index e5ca6c6c..1507088e 100644 --- a/tests/support/server.tcl +++ b/tests/support/server.tcl @@ -215,7 +215,8 @@ proc start_server {options {code undefined}} { if {[dict exists $config port]} { set port [dict get $config port] } # setup config dict - dict set srv "config" $config_file + dict set srv "config_file" $config_file + dict set srv "config" $config dict set srv "pid" $pid dict set srv "host" $host dict set srv "port" $port @@ -238,17 +239,12 @@ proc start_server {options {code undefined}} { after 10 } - set client [redis $host $port] - dict set srv "client" $client - - # select the right db when we don't have to authenticate - if {![dict exists $config requirepass]} { - $client select 9 - } - # append the server to the stack lappend ::servers $srv - + + # connect client (after server dict is put on the stack) + reconnect + # execute provided block set curnum $::testnum if {![catch { uplevel 1 $code } err]} {