Mercurial > hg > nginx-tests
changeset 936:e81cacf44cac
Tests: test rejecting new connection in stream_udp_limit_conn.t.
author | Andrey Zelenkov <zelenkov@nginx.com> |
---|---|
date | Tue, 24 May 2016 13:09:21 +0300 |
parents | 25a4b2fdd3fb |
children | b1fa8e0cc27b |
files | stream_udp_limit_conn.t |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/stream_udp_limit_conn.t Tue May 24 12:58:26 2016 +0300 +++ b/stream_udp_limit_conn.t Tue May 24 13:09:21 2016 +0300 @@ -75,7 +75,7 @@ EOF -$t->try_run('no stream udp')->plan(8); +$t->try_run('no stream udp')->plan(9); $t->run_daemon(\&udp_daemon, $t); $t->waitforfile($t->testdir . '/8080'); @@ -87,6 +87,10 @@ is($s->io('1'), '1', 'passed'); +# if not all responses were sent to client, then new request +# in same socket will be treated as new connection + +is($s->io('1', read_timeout => 0.1), '', 'rejected new connection'); is(dgram('127.0.0.1:8081')->io('1', read_timeout => 0.1), '', 'rejected same zone'); is(dgram('127.0.0.1:8082')->io('1'), '1', 'passed different zone');