Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: bumped the NGINX core to 1.27.0. #2317

Merged
merged 5 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ env:
#- NGINX_VERSION=1.21.4 OPENSSL_VER=1.1.0l OPENSSL_PATCH_VER=1.1.0d
#- NGINX_VERSION=1.25.1 OPENSSL_VER=1.1.0l OPENSSL_PATCH_VER=1.1.0d
- NGINX_VERSION=1.21.4 OPENSSL_VER=1.1.1w OPENSSL_PATCH_VER=1.1.1f
- NGINX_VERSION=1.25.3 OPENSSL_VER=1.1.1w OPENSSL_PATCH_VER=1.1.1f USE_PCRE2=Y
- NGINX_VERSION=1.25.3 BORINGSSL=1 TEST_NGINX_USE_HTTP3=1 USE_PCRE2=Y
- NGINX_VERSION=1.27.0 OPENSSL_VER=1.1.1w OPENSSL_PATCH_VER=1.1.1f USE_PCRE2=Y TEST_NGINX_TIMEOUT=5
- NGINX_VERSION=1.27.0 BORINGSSL=1 TEST_NGINX_USE_HTTP3=1 USE_PCRE2=Y TEST_NGINX_QUIC_IDLE_TIMEOUT=3
#- NGINX_VERSION=1.25.1 OPENSSL_VER=1.1.1w TEST_NGINX_USE_HTTP2=1

services:
Expand Down
2 changes: 1 addition & 1 deletion t/014-bugs.t
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ qr/curl: \(28\) Operation timed out after \d+ milliseconds with 0 bytes received
rewrite ^/myproxy/(.*) /$1 break;
resolver_timeout 3s;
#resolver 172.16.0.23; # AWS DNS resolver address is the same in all regions - 172.16.0.23
resolver 8.8.8.8;
resolver $TEST_NGINX_RESOLVER;
proxy_read_timeout 1s;
proxy_send_timeout 1s;
proxy_connect_timeout 1s;
Expand Down
59 changes: 35 additions & 24 deletions t/020-subrequest.t
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# vim:set ft= ts=4 sw=4 et fdm=marker:

use Test::Nginx::Socket::Lua;
use Test::Nginx::Util 'is_tcp_port_used';

#master_on();
#workers(1);
Expand All @@ -16,6 +17,16 @@ plan tests => repeat_each() * (blocks() * 3 + 23);
$ENV{TEST_NGINX_MEMCACHED_PORT} ||= 11211;
$ENV{TEST_NGINX_HTML_DIR} ||= html_dir();

# NB: tcp_listen_port needs to be greater than 10000,
# because the test cases expect it to be a 5-digit number
my $tcp_listen_port = 19113;
while (++$tcp_listen_port < 65535) {
if (!is_tcp_port_used $tcp_listen_port) {
last;
}
}
$ENV{TEST_NGINX_TCP_LISTEN_PORT} = $tcp_listen_port;

#no_diff();
no_long_string();
#no_shuffle();
Expand Down Expand Up @@ -1383,7 +1394,7 @@ upstream timed out

#proxy_read_timeout 100ms;
proxy_buffering on;
proxy_pass http://127.0.0.1:$TEST_NGINX_RAND_PORT_2;
proxy_pass http://127.0.0.1:$TEST_NGINX_TCP_LISTEN_PORT;
}

location /main {
Expand All @@ -1396,7 +1407,7 @@ upstream timed out
}
--- request
GET /main
--- tcp_listen: $TEST_NGINX_RAND_PORT_2
--- tcp_listen: $TEST_NGINX_TCP_LISTEN_PORT
--- tcp_query_len: 65
--- tcp_reply eval
"HTTP/1.0 200 OK\r\nContent-Length: 1024\r\n\r\nhello world"
Expand Down Expand Up @@ -1443,7 +1454,7 @@ upstream prematurely closed connection

proxy_read_timeout 100ms;
proxy_buffering on;
proxy_pass http://127.0.0.1:$TEST_NGINX_RAND_PORT_2;
proxy_pass http://127.0.0.1:$TEST_NGINX_TCP_LISTEN_PORT;
}

location /main {
Expand All @@ -1456,7 +1467,7 @@ upstream prematurely closed connection
}
--- request
GET /main
--- tcp_listen: $TEST_NGINX_RAND_PORT_2
--- tcp_listen: $TEST_NGINX_TCP_LISTEN_PORT
--- tcp_no_close
--- tcp_reply eval
"HTTP/1.0 200 OK\r\nContent-Length: 1024\r\n\r\nhello world"
Expand Down Expand Up @@ -1505,7 +1516,7 @@ upstream timed out

#proxy_read_timeout 100ms;
proxy_buffering on;
proxy_pass http://127.0.0.1:$TEST_NGINX_RAND_PORT_2;
proxy_pass http://127.0.0.1:$TEST_NGINX_TCP_LISTEN_PORT;
}

location /main {
Expand All @@ -1518,7 +1529,7 @@ upstream timed out
}
--- request
GET /main
--- tcp_listen: $TEST_NGINX_RAND_PORT_2
--- tcp_listen: $TEST_NGINX_TCP_LISTEN_PORT
--- tcp_query_len: 65
--- tcp_reply eval
"HTTP/1.0 200 OK\r\n\r\nhello world"
Expand Down Expand Up @@ -1565,7 +1576,7 @@ truncated: false

proxy_read_timeout 100ms;
proxy_buffering on;
proxy_pass http://127.0.0.1:$TEST_NGINX_RAND_PORT_2;
proxy_pass http://127.0.0.1:$TEST_NGINX_TCP_LISTEN_PORT;
}

location /main {
Expand All @@ -1578,7 +1589,7 @@ truncated: false
}
--- request
GET /main
--- tcp_listen: $TEST_NGINX_RAND_PORT_2
--- tcp_listen: $TEST_NGINX_TCP_LISTEN_PORT
--- tcp_no_close
--- tcp_reply eval
"HTTP/1.0 200 OK\r\n\r\nhello world"
Expand Down Expand Up @@ -1628,7 +1639,7 @@ upstream timed out

#proxy_read_timeout 100ms;
proxy_buffering off;
proxy_pass http://127.0.0.1:$TEST_NGINX_RAND_PORT_2;
proxy_pass http://127.0.0.1:$TEST_NGINX_TCP_LISTEN_PORT;
}

location /main {
Expand All @@ -1641,7 +1652,7 @@ upstream timed out
}
--- request
GET /main
--- tcp_listen: $TEST_NGINX_RAND_PORT_2
--- tcp_listen: $TEST_NGINX_TCP_LISTEN_PORT
--- tcp_query_len: 65
--- tcp_reply eval
"HTTP/1.0 200 OK\r\n\r\nhello world"
Expand Down Expand Up @@ -1688,7 +1699,7 @@ truncated: false

proxy_read_timeout 500ms;
proxy_buffering off;
proxy_pass http://127.0.0.1:$TEST_NGINX_RAND_PORT_2;
proxy_pass http://127.0.0.1:$TEST_NGINX_TCP_LISTEN_PORT;
}

location /main {
Expand All @@ -1701,7 +1712,7 @@ truncated: false
}
--- request
GET /main
--- tcp_listen: $TEST_NGINX_RAND_PORT_2
--- tcp_listen: $TEST_NGINX_TCP_LISTEN_PORT
--- tcp_no_close
--- tcp_reply eval
"HTTP/1.0 200 OK\r\n\r\nhello world"
Expand Down Expand Up @@ -1914,7 +1925,7 @@ a client request body is buffered to a temporary file
#proxy_read_timeout 100ms;
proxy_http_version 1.1;
proxy_buffering on;
proxy_pass http://127.0.0.1:$TEST_NGINX_RAND_PORT_2;
proxy_pass http://127.0.0.1:$TEST_NGINX_TCP_LISTEN_PORT;
}

location /main {
Expand All @@ -1927,7 +1938,7 @@ a client request body is buffered to a temporary file
}
--- request
GET /main
--- tcp_listen: $TEST_NGINX_RAND_PORT_2
--- tcp_listen: $TEST_NGINX_TCP_LISTEN_PORT
--- tcp_query_len: 65
--- tcp_reply eval
"HTTP/1.1 200 OK\r\nTransfer-Encoding: chunked\r\n\r\nb\r\nhello world\r"
Expand Down Expand Up @@ -1977,7 +1988,7 @@ upstream prematurely closed connection
#proxy_read_timeout 100ms;
proxy_http_version 1.1;
proxy_buffering off;
proxy_pass http://127.0.0.1:$TEST_NGINX_RAND_PORT_2;
proxy_pass http://127.0.0.1:$TEST_NGINX_TCP_LISTEN_PORT;
}

location /main {
Expand All @@ -1990,7 +2001,7 @@ upstream prematurely closed connection
}
--- request
GET /main
--- tcp_listen: $TEST_NGINX_RAND_PORT_2
--- tcp_listen: $TEST_NGINX_TCP_LISTEN_PORT
--- tcp_query_len: 65
--- tcp_reply eval
"HTTP/1.1 200 OK\r\nTransfer-Encoding: chunked\r\n\r\nb\r\nhello world\r"
Expand Down Expand Up @@ -2038,7 +2049,7 @@ upstream prematurely closed connection
proxy_read_timeout 100ms;
proxy_buffering on;
proxy_http_version 1.1;
proxy_pass http://127.0.0.1:$TEST_NGINX_RAND_PORT_2;
proxy_pass http://127.0.0.1:$TEST_NGINX_TCP_LISTEN_PORT;
}

location /main {
Expand All @@ -2051,7 +2062,7 @@ upstream prematurely closed connection
}
--- request
GET /main
--- tcp_listen: $TEST_NGINX_RAND_PORT_2
--- tcp_listen: $TEST_NGINX_TCP_LISTEN_PORT
--- tcp_no_close
--- tcp_reply eval
"HTTP/1.1 200 OK\r\nTransfer-Encoding: chunked\r\n\r\nb\r\nhello world\r"
Expand Down Expand Up @@ -2100,7 +2111,7 @@ upstream timed out
#proxy_read_timeout 100ms;
proxy_buffering on;
proxy_http_version 1.1;
proxy_pass http://127.0.0.1:$TEST_NGINX_RAND_PORT_2;
proxy_pass http://127.0.0.1:$TEST_NGINX_TCP_LISTEN_PORT;
}

location /main {
Expand All @@ -2113,7 +2124,7 @@ upstream timed out
}
--- request
GET /main
--- tcp_listen: $TEST_NGINX_RAND_PORT_2
--- tcp_listen: $TEST_NGINX_TCP_LISTEN_PORT
--- tcp_no_close
--- tcp_reply eval
"HTTP/1.1 200 OK\r\nTransfer-Encoding: chunked\r\n\r\n5\r\nhello\r\n0\r\n\r\n"
Expand Down Expand Up @@ -2158,7 +2169,7 @@ truncated: false
#proxy_read_timeout 100ms;
proxy_buffering off;
proxy_http_version 1.1;
proxy_pass http://127.0.0.1:$TEST_NGINX_RAND_PORT_2;
proxy_pass http://127.0.0.1:$TEST_NGINX_TCP_LISTEN_PORT;
}

location /main {
Expand All @@ -2171,7 +2182,7 @@ truncated: false
}
--- request
GET /main
--- tcp_listen: $TEST_NGINX_RAND_PORT_2
--- tcp_listen: $TEST_NGINX_TCP_LISTEN_PORT
--- tcp_no_close
--- tcp_reply eval
"HTTP/1.1 200 OK\r\nTransfer-Encoding: chunked\r\n\r\n5\r\nhello\r\n0\r\n\r\n"
Expand Down Expand Up @@ -2217,7 +2228,7 @@ truncated: false

#proxy_read_timeout 100ms;
proxy_buffering off;
proxy_pass http://127.0.0.1:$TEST_NGINX_RAND_PORT_2;
proxy_pass http://127.0.0.1:$TEST_NGINX_TCP_LISTEN_PORT;
}

location /main {
Expand All @@ -2230,7 +2241,7 @@ truncated: false
}
--- request
GET /main
--- tcp_listen: $TEST_NGINX_RAND_PORT_2
--- tcp_listen: $TEST_NGINX_TCP_LISTEN_PORT
--- tcp_query_len: 65
--- tcp_reply eval
"HTTP/1.0 200 OK\r\nContent-Length: 1024\r\n\r\nhello world"
Expand Down
4 changes: 4 additions & 0 deletions t/068-socket-keepalive.t
Original file line number Diff line number Diff line change
Expand Up @@ -3109,6 +3109,8 @@ qr/\Qbad argument #1 to 'setkeepalive' (number expected, got string)\E/
--- no_error_log
[crit]
--- timeout: 4
--- curl_error eval
qr{HTTP/3 stream 0 reset by server}



Expand Down Expand Up @@ -3189,3 +3191,5 @@ qr/\Qbad argument #2 to 'setkeepalive' (number expected, got string)\E/
--- no_error_log
[crit]
--- timeout: 4
--- curl_error eval
qr{HTTP/3 stream 0 reset by server}
3 changes: 3 additions & 0 deletions t/163-signal.t
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ our $SkipReason;
BEGIN {
if ($ENV{TEST_NGINX_USE_HUP}) {
$SkipReason = "unavailable under hup test mode";

} elsif ($ENV{TEST_NGINX_CHECK_LEAK}) {
$SkipReason = "unavailable under check leak test mode";
}
}

Expand Down
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
Loading