Skip to content

Commit

Permalink
feat: upgrade lua-resty-healthcheck to 3.2.0 (#10307)
Browse files Browse the repository at this point in the history
  • Loading branch information
monkeyDluffy6017 authored Oct 10, 2023
1 parent 7390d77 commit d2cd041
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 14 deletions.
3 changes: 2 additions & 1 deletion rockspec/apisix-master-0.rockspec
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ dependencies = {
"lua-resty-balancer = 0.04",
"lua-resty-ngxvar = 0.5.2",
"lua-resty-jit-uuid = 0.0.7",
"lua-resty-healthcheck-api7 = 3.0.0",
"lua-resty-worker-events = 1.0.0",
"lua-resty-healthcheck-api7 = 3.2.0",
"api7-lua-resty-jwt = 0.2.5",
"lua-resty-hmac-ffi = 0.06-1",
"lua-resty-cookie = 0.2.0-1",
Expand Down
10 changes: 5 additions & 5 deletions t/control/healthcheck.t
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ routes:
upstreams:
- nodes:
"127.0.0.1:1980": 1
"127.0.0.2:1988": 1
"127.0.0.2:1988": 0
type: roundrobin
id: 1
checks:
Expand Down Expand Up @@ -120,11 +120,11 @@ upstreams:
--- grep_error_log eval
qr/unhealthy TCP increment \(.+\) for '[^']+'/
--- grep_error_log_out
unhealthy TCP increment (1/2) for '(127.0.0.2:1988)'
unhealthy TCP increment (2/2) for '(127.0.0.2:1988)'
unhealthy TCP increment (1/2) for '127.0.0.2(127.0.0.2:1988)'
unhealthy TCP increment (2/2) for '127.0.0.2(127.0.0.2:1988)'
--- response_body
[{"counter":{"http_failure":0,"success":0,"tcp_failure":0,"timeout_failure":0},"ip":"127.0.0.1","port":1980,"status":"healthy"},{"counter":{"http_failure":0,"success":0,"tcp_failure":2,"timeout_failure":0},"ip":"127.0.0.2","port":1988,"status":"unhealthy"}]
[{"counter":{"http_failure":0,"success":0,"tcp_failure":0,"timeout_failure":0},"ip":"127.0.0.1","port":1980,"status":"healthy"},{"counter":{"http_failure":0,"success":0,"tcp_failure":2,"timeout_failure":0},"ip":"127.0.0.2","port":1988,"status":"unhealthy"}]
[{"counter":{"http_failure":0,"success":0,"tcp_failure":0,"timeout_failure":0},"hostname":"127.0.0.1","ip":"127.0.0.1","port":1980,"status":"healthy"},{"counter":{"http_failure":0,"success":0,"tcp_failure":2,"timeout_failure":0},"hostname":"127.0.0.2","ip":"127.0.0.2","port":1988,"status":"unhealthy"}]
[{"counter":{"http_failure":0,"success":0,"tcp_failure":0,"timeout_failure":0},"hostname":"127.0.0.1","ip":"127.0.0.1","port":1980,"status":"healthy"},{"counter":{"http_failure":0,"success":0,"tcp_failure":2,"timeout_failure":0},"hostname":"127.0.0.2","ip":"127.0.0.2","port":1988,"status":"unhealthy"}]
Expand Down
4 changes: 2 additions & 2 deletions t/discovery/consul.t
Original file line number Diff line number Diff line change
Expand Up @@ -613,8 +613,8 @@ upstreams:
--- request
GET /thc
--- response_body
[{"ip":"127.0.0.1","port":30513,"status":"healthy"},{"ip":"127.0.0.1","port":30514,"status":"healthy"}]
[{"ip":"127.0.0.1","port":30513,"status":"healthy"},{"ip":"127.0.0.1","port":30514,"status":"healthy"}]
[{"hostname":"127.0.0.1","ip":"127.0.0.1","port":30513,"status":"healthy"},{"hostname":"127.0.0.1","ip":"127.0.0.1","port":30514,"status":"healthy"}]
[{"hostname":"127.0.0.1","ip":"127.0.0.1","port":30513,"status":"healthy"},{"hostname":"127.0.0.1","ip":"127.0.0.1","port":30514,"status":"healthy"}]
--- ignore_error_log
Expand Down
4 changes: 2 additions & 2 deletions t/discovery/consul_kv.t
Original file line number Diff line number Diff line change
Expand Up @@ -481,8 +481,8 @@ upstreams:
--- request
GET /thc
--- response_body
[{"ip":"127.0.0.1","port":30511,"status":"healthy"},{"ip":"127.0.0.2","port":1988,"status":"unhealthy"}]
[{"ip":"127.0.0.1","port":30511,"status":"healthy"},{"ip":"127.0.0.2","port":1988,"status":"unhealthy"}]
[{"hostname":"127.0.0.1","ip":"127.0.0.1","port":30511,"status":"healthy"},{"hostname":"127.0.0.2","ip":"127.0.0.2","port":1988,"status":"unhealthy"}]
[{"hostname":"127.0.0.1","ip":"127.0.0.1","port":30511,"status":"healthy"},{"hostname":"127.0.0.2","ip":"127.0.0.2","port":1988,"status":"unhealthy"}]
--- ignore_error_log
Expand Down
2 changes: 1 addition & 1 deletion t/node/healthcheck-discovery.t
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ routes:
local httpc = http.new()
local res, err = httpc:request_uri(uri, {method = "GET", keepalive = false})
ngx.sleep(0.5)
ngx.sleep(1.5)
ngx.say(res.status)
}
Expand Down
1 change: 1 addition & 0 deletions t/node/healthcheck.t
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@ qr{\[error\].*while connecting to upstream.*}
qr{.*http://127.0.0.1:1960/server_port.*
.*http://127.0.0.1:1961/server_port.*
.*http://127.0.0.1:1961/server_port.*
.*http://127.0.0.1:1960/server_port.*
.*http://127.0.0.1:1961/server_port.*
.*http://127.0.0.1:1961/server_port.*}
--- timeout: 10
Expand Down
6 changes: 3 additions & 3 deletions t/node/priority-balancer/health-checker.t
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ upstreams:
GET /t
--- error_log
connect() failed
unhealthy TCP increment (2/2) for '(127.0.0.1:1979)
unhealthy TCP increment (2/2) for '(127.0.0.2:1979)
unhealthy TCP increment (2/2) for '127.0.0.1(127.0.0.1:1979)
unhealthy TCP increment (2/2) for '127.0.0.2(127.0.0.2:1979)
--- grep_error_log eval
qr/proxy request to \S+/
--- grep_error_log_out
Expand Down Expand Up @@ -177,7 +177,7 @@ passed
GET /t
--- error_log
connect() failed
unhealthy TCP increment (2/2) for '(127.0.0.1:1979)
unhealthy TCP increment (2/2) for '127.0.0.1(127.0.0.1:1979)
--- grep_error_log eval
qr/proxy request to \S+/
--- grep_error_log_out
Expand Down

0 comments on commit d2cd041

Please sign in to comment.