diff options
author | antirez <antirez@gmail.com> | 2014-02-17 12:29:54 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2014-02-17 16:44:57 +0100 |
commit | a1dca2efab3e5b18054072e487f6f54814fd8992 (patch) | |
tree | f299d6615b8f6ee7e4f266652091b7aa85a896ad /tests/test_helper.tcl | |
parent | ede33fb91259000950db667b1e92dd6e398a01f7 (diff) | |
download | redis-a1dca2efab3e5b18054072e487f6f54814fd8992.tar.gz |
Test: code to test server availability refactored.
Some inline test moved into server_is_up procedure.
Also find_available_port was moved into util since it is going
to be used for the Sentinel test as well.
Diffstat (limited to 'tests/test_helper.tcl')
-rw-r--r-- | tests/test_helper.tcl | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/tests/test_helper.tcl b/tests/test_helper.tcl index a0badb879..062c318e5 100644 --- a/tests/test_helper.tcl +++ b/tests/test_helper.tcl @@ -164,21 +164,6 @@ proc cleanup {} { if {!$::quiet} {puts "OK"} } -proc find_available_port start { - for {set j $start} {$j < $start+1024} {incr j} { - if {[catch { - set fd [socket 127.0.0.1 $j] - }]} { - return $j - } else { - close $fd - } - } - if {$j == $start+1024} { - error "Can't find a non busy port in the $start-[expr {$start+1023}] range." - } -} - proc test_server_main {} { cleanup set tclsh [info nameofexecutable] |