Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
5b7b2353
Commit
5b7b2353
authored
Feb 02, 2016
by
antirez
Browse files
Fix to Cluster test to support @busport format.
parent
cbcffed9
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/support/cluster.tcl
View file @
5b7b2353
...
...
@@ -58,7 +58,8 @@ proc ::redis_cluster::__method__refresh_nodes_map {id} {
set idx 0
;
# Index of the node that will respond.
set errmsg
{}
foreach start_node $::redis_cluster::startup_nodes
(
$id
)
{
lassign
[
split $start_node :
]
start_host start_port
set ip_port
[
lindex
[
split $start_node @
]
0
]
lassign
[
split $ip_port :
]
start_host start_port
if
{[
catch
{
set r
{}
set r
[
redis $start_host $start_port
]
...
...
@@ -68,7 +69,7 @@ proc ::redis_cluster::__method__refresh_nodes_map {id} {
if
{
$r
ne
{}}
{
catch
{
$r
close
}}
incr idx
if
{[
string length $errmsg
]
< 200
}
{
append errmsg
"
$
start
_node
:
$e
"
append errmsg
"
$
ip
_port
:
$e
"
}
continue
;
# Try next.
}
else
{
...
...
@@ -98,6 +99,7 @@ proc ::redis_cluster::__method__refresh_nodes_map {id} {
set args
[
split $line
" "
]
lassign $args nodeid addr flags slaveof pingsent pongrecv configepoch linkstate
set slots
[
lrange $args 8 end
]
set addr
[
lindex
[
split $addr @
]
0
]
if
{
$addr
eq
{
:0
}}
{
set addr $start_host:$start_port
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment