X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/0681c5ad844cefefbe62f30df6587c0cbec3272e..d0dc3d82042402816f640576a1e203cb7da86206:/tests/support/server.tcl diff --git a/tests/support/server.tcl b/tests/support/server.tcl index 3fa1725f..c2d7132d 100644 --- a/tests/support/server.tcl +++ b/tests/support/server.tcl @@ -154,7 +154,8 @@ proc start_server {options {code undefined}} { dict set config dir [tmpdir server] # start every server on a different port - dict set config port [incr ::port] + set ::port [find_available_port [expr {$::port+1}]] + dict set config port $::port # apply overrides from global space and arguments foreach {directive arguments} [concat $::global_overrides $overrides] {