Skip to content

Commit

Permalink
fix test to support new output format of CLUSTER NODES
Browse files Browse the repository at this point in the history
  • Loading branch information
mna committed Oct 8, 2017
1 parent 126a2f3 commit a2dd259
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion redistest/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,12 @@ func getClusterNodeIDs(t *testing.T, ports ...string) map[string]string {
s := bufio.NewScanner(strings.NewReader(nodes))
for s.Scan() {
fields := strings.Fields(s.Text())
addrField := fields[1]
if ix := strings.Index(addrField, "@"); ix >= 0 {
addrField = addrField[:ix]
}
for _, port := range ports {
if fields[1] == "127.0.0.1:"+port {
if addrField == "127.0.0.1:"+port {
mapping[port] = fields[0]
break
}
Expand Down

0 comments on commit a2dd259

Please sign in to comment.