Mercurial > hg > nginx-tests
changeset 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 | da1a459c9318 |
children | 5a1f2e1ea6cd |
files | http_resolver.t |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/http_resolver.t Thu Sep 18 12:38:31 2014 +0400 +++ b/http_resolver.t Thu Sep 18 12:47:49 2014 +0400 @@ -89,11 +89,13 @@ $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 @@ while (1) { $socket->recv($recv_data, 65536); + next if $port == 8089; $data = reply_handler($recv_data, $port, \%state); $socket->send($data); }