File tree Expand file tree Collapse file tree 2 files changed +16
-5
lines changed
Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -603,17 +603,28 @@ lua udp socket receive buffer size: 8192
603603=== TEST 11 : access the google DNS server (using domain names)
604604-- - config
605605 server_tokens off;
606- resolver $ TEST_NGINX_RESOLVER ;
606+ resolver $ TEST_NGINX_RESOLVER ipv6 = off ;
607607 location / t {
608608 content_by_lua '
609+ -- avoid flushing google in "check leak" testing mode:
610+ local counter = package.loaded.counter
611+ if not counter then
612+ counter = 1
613+ elseif counter >= 2 then
614+ return ngx.exit(503)
615+ else
616+ counter = counter + 1
617+ end
618+ package.loaded.counter = counter
619+
609620 local socket = ngx.socket
610621 -- local socket = require "socket"
611622
612623 local udp = socket.udp()
613624
614625 udp:settimeout(2000) -- 2 sec
615626
616- local ok, err = udp:setpeername("$TEST_NGINX_RESOLVER ", 53)
627+ local ok, err = udp:setpeername("google-public-dns-a.google.com ", 53)
617628 if not ok then
618629 ngx.say("failed to connect: ", err)
619630 return
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ __DATA__
4040=== TEST 1 : www. google. com
4141-- - config
4242 server_tokens off;
43- resolver $ TEST_NGINX_RESOLVER ;
43+ resolver $ TEST_NGINX_RESOLVER ipv6 = off ;
4444 location / t {
4545 # set $port 5000;
4646 set $ port $ TEST_NGINX_MEMCACHED_PORT ;
@@ -852,7 +852,7 @@ SSL reused session
852852=== TEST 11 : www. google. com (SSL verify passes)
853853-- - config
854854 server_tokens off;
855- resolver $ TEST_NGINX_RESOLVER ;
855+ resolver $ TEST_NGINX_RESOLVER ipv6 = off ;
856856 lua_ssl_trusted_certificate .. / html/ trusted. crt;
857857 lua_ssl_verify_depth 3 ;
858858 location / t {
@@ -945,7 +945,7 @@ SSL reused session
945945=== TEST 12 : www. google. com (SSL verify enabled and no corresponding trusted certificates)
946946-- - config
947947 server_tokens off;
948- resolver $ TEST_NGINX_RESOLVER ;
948+ resolver $ TEST_NGINX_RESOLVER ipv6 = off ;
949949 lua_ssl_trusted_certificate .. / html/ trusted. crt;
950950 lua_ssl_verify_depth 3 ;
951951 location / t {
You can’t perform that action at this time.
0 commit comments