Mercurial > hg > nginx-tests
changeset 836:a9c4cebcfe69
Tests: adjusted http resolver test with resend.
Don't bother with socket error to force resolver resend. Nginx doesn't handle
well ECONNREFUSED send() error, which results in "500 Internal Server Error".
It may deserve a separate test, though.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Fri, 29 Jan 2016 00:40:05 +0300 |
parents | 650465c099e1 |
children | 68a6678abae2 |
files | http_resolver.t |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/http_resolver.t +++ b/http_resolver.t @@ -83,7 +83,7 @@ http { proxy_pass http://$host:8080/backend; } location /tcp { - resolver 127.0.0.1:8083 127.0.0.1:8084; + resolver 127.0.0.1:8083 127.0.0.1:8082; resolver_timeout 1s; proxy_pass http://$host:8080/backend; proxy_connect_timeout 1s; @@ -495,6 +495,7 @@ sub reply_handler { } } elsif ($name =~ /tcp2?.example.net/) { + $rcode = FORMERR if $port == 8082; $hdr |= 0x0300 unless $extra{tcp}; push @rdata, rd_addr($ttl, $extra{tcp} ? '127.0.0.1' : '127.0.0.201') if $type == A;