mirror of
https://github.com/fluencelabs/redis
synced 2025-07-31 16:31:58 +00:00
diffrent fix for runtest --host --port
This commit is contained in:
@@ -212,13 +212,19 @@ proc test_server_main {} {
|
||||
|
||||
# Start the client instances
|
||||
set ::clients_pids {}
|
||||
set start_port [expr {$::port+100}]
|
||||
for {set j 0} {$j < $::numclients} {incr j} {
|
||||
set start_port [find_available_port $start_port]
|
||||
if {$::external} {
|
||||
set p [exec $tclsh [info script] {*}$::argv \
|
||||
--client $port --port $start_port &]
|
||||
--client $port --port $::port &]
|
||||
lappend ::clients_pids $p
|
||||
incr start_port 10
|
||||
} else {
|
||||
set start_port [expr {$::port+100}]
|
||||
for {set j 0} {$j < $::numclients} {incr j} {
|
||||
set start_port [find_available_port $start_port]
|
||||
set p [exec $tclsh [info script] {*}$::argv \
|
||||
--client $port --port $start_port &]
|
||||
lappend ::clients_pids $p
|
||||
incr start_port 10
|
||||
}
|
||||
}
|
||||
|
||||
# Setup global state for the test server
|
||||
@@ -506,9 +512,6 @@ for {set j 0} {$j < [llength $argv]} {incr j} {
|
||||
} elseif {$opt eq {--host}} {
|
||||
set ::external 1
|
||||
set ::host $arg
|
||||
# If we use an external server, we can only set numclients to 1,
|
||||
# otherwise the port will be miscalculated.
|
||||
set ::numclients 1
|
||||
incr j
|
||||
} elseif {$opt eq {--port}} {
|
||||
set ::port $arg
|
||||
|
Reference in New Issue
Block a user