Closed sysulq closed 3 years ago
table servers do not guarantee the order, so the test case may get failed in some conditions.
servers
local servers = { ["server1"] = 10, ["server2"] = 2, ["server3"] = 1, }
➜ lua-resty-balancer git:(hotfix/testcase) ✗ make test PATH=/usr/local/openresty-debug/nginx/sbin:$PATH prove -I../test-nginx/lib -r t t/chash.t ....... 13/30 # Failed test 'TEST 1: find - response_body - response is expected (repeated req 0, req 0)' # at /usr/local/share/perl/5.30.0/Test/Nginx/Socket.pm line 1589. # @@ -1,4 +1,4 @@ # +server3: 8182 # server1: 77075 # server2: 14743 # -server3: 8182 # points number: 2080 # Failed test 'TEST 1: find - response_body - response is expected (repeated req 1, req 0)' # at /usr/local/share/perl/5.30.0/Test/Nginx/Socket.pm line 1589. # @@ -1,4 +1,4 @@ # +server3: 8182 # server1: 77075 # server2: 14743 # -server3: 8182 # points number: 2080 # Looks like you failed 2 tests of 30.
table
servers
do not guarantee the order, so the test case may get failed in some conditions.