refactor lua balancer and fix ipv6 issue
This commit is contained in:
parent
082325b6f5
commit
4b07e73e5d
7 changed files with 16 additions and 29 deletions
|
|
@ -21,9 +21,8 @@ describe("Balancer chash", function()
|
|||
}
|
||||
local instance = balancer_chash:new(backend)
|
||||
|
||||
local host, port = instance:balance()
|
||||
assert.equal("10.184.7.40", host)
|
||||
assert.equal("8080", port)
|
||||
local peer = instance:balance()
|
||||
assert.equal("10.184.7.40:8080", peer)
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue