Mercurial > hg > nginx-tests
comparison http_resolver_cname.t @ 863:44a9a45aa041
Tests: adjusted http_resolver_cname.t test timeouts.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Fri, 04 Mar 2016 13:13:11 +0300 |
parents | ff8c68cd2be4 |
children | 6bb1f2ccd386 |
comparison
equal
deleted
inserted
replaced
862:3021b44d0594 | 863:44a9a45aa041 |
---|---|
131 @s = (); | 131 @s = (); |
132 | 132 |
133 push @s, http_host('cn09.example.net', '/long', start => 1); | 133 push @s, http_host('cn09.example.net', '/long', start => 1); |
134 push @s, http_host('cn09.example.net', '/long', start => 1); | 134 push @s, http_host('cn09.example.net', '/long', start => 1); |
135 | 135 |
136 sleep 2; | 136 select undef, undef, undef, 0.4; # let resolver hang on CNAME |
137 | 137 |
138 close(shift @s); | 138 close(shift @s); |
139 | 139 |
140 like(http_end(pop @s), qr/200 OK/, 'abort on CNAME'); | 140 like(http_end(pop @s), qr/200 OK/, 'abort on CNAME'); |
141 | 141 |
221 push @rdata, pack("n3N nCa4n", 0xc00c, CNAME, IN, $ttl, | 221 push @rdata, pack("n3N nCa4n", 0xc00c, CNAME, IN, $ttl, |
222 7, 4, "cn08", 0xc011); | 222 7, 4, "cn08", 0xc011); |
223 | 223 |
224 } elsif ($name eq 'cn09.example.net') { | 224 } elsif ($name eq 'cn09.example.net') { |
225 if ($type == A) { | 225 if ($type == A) { |
226 select undef, undef, undef, 1.1; | 226 # await both HTTP requests |
227 select undef, undef, undef, 0.2; | |
227 } | 228 } |
228 push @rdata, pack("n3N nCa1n", 0xc00c, CNAME, IN, $ttl, | 229 push @rdata, pack("n3N nCa1n", 0xc00c, CNAME, IN, $ttl, |
229 4, 1, "b", 0xc011); | 230 4, 1, "b", 0xc011); |
230 | 231 |
231 } elsif ($name eq 'cn052.example.net') { | 232 } elsif ($name eq 'cn052.example.net') { |