Skip to content

Commit

Permalink
Merge branch '3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurenceLiZhixin committed Jun 21, 2021
2 parents 727e346 + fc2cd0d commit 268e072
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cluster/loadbalance/consistent_hash_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import (
const (
ip = "192.168.1.0"
port8080 = 8080
port8082 = 8082
port8081 = 8081

url8080Short = "dubbo://192.168.1.0:8080"
url8081Short = "dubbo://192.168.1.0:8081"
Expand Down Expand Up @@ -114,9 +114,9 @@ func (s *consistentHashLoadBalanceSuite) SetupTest() {
func (s *consistentHashLoadBalanceSuite) TestSelect() {
args := []interface{}{"name", "password", "age"}
invoker := s.lb.Select(s.invokers, invocation.NewRPCInvocation("echo", args, nil))
s.Equal(invoker.GetURL().Location, fmt.Sprintf("%s:%d", ip, port8080))
s.Equal(fmt.Sprintf("%s:%d", ip, port8081), invoker.GetURL().Location)

args = []interface{}{"ok", "abc"}
invoker = s.lb.Select(s.invokers, invocation.NewRPCInvocation("echo", args, nil))
s.Equal(invoker.GetURL().Location, fmt.Sprintf("%s:%d", ip, port8082))
s.Equal(fmt.Sprintf("%s:%d", ip, port8080), invoker.GetURL().Location)
}

0 comments on commit 268e072

Please sign in to comment.