# HG changeset patch # User Andrey Zelenkov # Date 1464084561 -10800 # Node ID e81cacf44cac0cd82e03c450ff047ed6510e2652 # Parent 25a4b2fdd3fbead2cce83593ddf89ba43f78ee1e Tests: test rejecting new connection in stream_udp_limit_conn.t. diff --git a/stream_udp_limit_conn.t b/stream_udp_limit_conn.t --- a/stream_udp_limit_conn.t +++ b/stream_udp_limit_conn.t @@ -75,7 +75,7 @@ stream { 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 @@ my $s = dgram('127.0.0.1:8081'); 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');