diff http_resolver.t @ 464:5ec2caad00e8

Tests: fixed resolver timeout test. Writes to a closed UDP socket may result in an immediate error on some platforms, notably on linux, hence the test could pass unexpectedly.
author Sergey Kandaurov <pluknet@nginx.com>
date Thu, 18 Sep 2014 12:47:49 +0400
parents a65cb9330c91
children e82bbe71f50c
line wrap: on
line diff
--- a/http_resolver.t
+++ b/http_resolver.t
@@ -89,11 +89,13 @@ EOF
 
 $t->run_daemon(\&dns_daemon, 8081, $t);
 $t->run_daemon(\&dns_daemon, 8082, $t);
+$t->run_daemon(\&dns_daemon, 8089, $t);
 
 $t->run()->plan(32);
 
 $t->waitforfile($t->testdir . '/8081');
 $t->waitforfile($t->testdir . '/8082');
+$t->waitforfile($t->testdir . '/8089');
 
 ###############################################################################
 
@@ -483,6 +485,7 @@ sub dns_daemon {
 
 	while (1) {
 		$socket->recv($recv_data, 65536);
+		next if $port == 8089;
 		$data = reply_handler($recv_data, $port, \%state);
 		$socket->send($data);
 	}