changeset 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 3021b44d0594
children 460a9cadbd2f
files http_resolver_cname.t
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/http_resolver_cname.t
+++ b/http_resolver_cname.t
@@ -133,7 +133,7 @@ like(http_end(pop @s), qr/502 Bad/, 'CNA
 push @s, http_host('cn09.example.net', '/long', start => 1);
 push @s, http_host('cn09.example.net', '/long', start => 1);
 
-sleep 2;
+select undef, undef, undef, 0.4;	# let resolver hang on CNAME
 
 close(shift @s);
 
@@ -223,7 +223,8 @@ sub reply_handler {
 
 	} elsif ($name eq 'cn09.example.net') {
 		if ($type == A) {
-			select undef, undef, undef, 1.1;
+			# await both HTTP requests
+			select undef, undef, undef, 0.2;
 		}
 		push @rdata, pack("n3N nCa1n", 0xc00c, CNAME, IN, $ttl,
 			4, 1, "b", 0xc011);