Skip to content

Commit

Permalink
tests: t/188-*.t: use random port instead of 8090 port.
Browse files Browse the repository at this point in the history
  • Loading branch information
jiahao committed Aug 6, 2024
1 parent 2d8fcbe commit 0cc05a6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions t/188-balancer_keepalive_pool_max_retry.t
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ __DATA__
if ngx.ctx.tries == 1 then
balancer.set_more_tries(5)
end

local host = "127.0.0.1"
local port = 8090;
local port = $TEST_NGINX_RAND_PORT_1;

local ok, err = balancer.set_current_peer(host, port)
if not ok then
Expand All @@ -56,9 +56,9 @@ __DATA__
}

server {
listen 0.0.0.0:8090;
listen 127.0.0.1:$TEST_NGINX_RAND_PORT_1;
location /hello {
content_by_lua_block{
content_by_lua_block{
local request_counter = ngx.shared.request_counter
local first_request = request_counter:get("first_request")
if first_request == nil then
Expand All @@ -74,7 +74,7 @@ __DATA__
location = /t {
proxy_pass http://my_upstream;
proxy_set_header Connection "keep-alive";

rewrite_by_lua_block {
ngx.req.set_uri("/hello")
}
Expand Down

0 comments on commit 0cc05a6

Please sign in to comment.