# HG changeset patch # User Andrey Zelenkov # Date 1443022174 -10800 # Node ID 824754da4afc4c48877299aa053d4da1c6bb4283 # Parent aed139eaaf3ffde2d4d6701c556ffd3c0f4d2fc7 Tests: adjusted socket read timeout in stream tests. Read timeout was increased to prevent situation when data is delayed with more than 3 seconds. In this case, part of the response could be cut off. diff --git a/stream_access.t b/stream_access.t --- a/stream_access.t +++ b/stream_access.t @@ -243,7 +243,7 @@ sub stream_read { my ($buf); $s->blocking(0); - if (IO::Select->new($s)->can_read(3)) { + if (IO::Select->new($s)->can_read(5)) { $s->sysread($buf, 1024); }; diff --git a/stream_limit_rate.t b/stream_limit_rate.t --- a/stream_limit_rate.t +++ b/stream_limit_rate.t @@ -182,7 +182,7 @@ sub stream_read { my ($buf); $s->blocking(0); - if (IO::Select->new($s)->can_read(3)) { + if (IO::Select->new($s)->can_read(5)) { $s->sysread($buf, 1024); }; diff --git a/stream_proxy.t b/stream_proxy.t --- a/stream_proxy.t +++ b/stream_proxy.t @@ -99,7 +99,7 @@ sub stream_read { my ($buf); $s->blocking(0); - if (IO::Select->new($s)->can_read(3)) { + if (IO::Select->new($s)->can_read(5)) { $s->sysread($buf, 1024); }; diff --git a/stream_proxy_protocol.t b/stream_proxy_protocol.t --- a/stream_proxy_protocol.t +++ b/stream_proxy_protocol.t @@ -116,7 +116,7 @@ sub stream_read { my ($buf); $s->blocking(0); - if (IO::Select->new($s)->can_read(3)) { + if (IO::Select->new($s)->can_read(5)) { $s->sysread($buf, 1024); }; diff --git a/stream_proxy_protocol_ipv6.t b/stream_proxy_protocol_ipv6.t --- a/stream_proxy_protocol_ipv6.t +++ b/stream_proxy_protocol_ipv6.t @@ -119,7 +119,7 @@ sub stream_read { my ($buf); $s->blocking(0); - if (IO::Select->new($s)->can_read(3)) { + if (IO::Select->new($s)->can_read(5)) { $s->sysread($buf, 1024); }; diff --git a/stream_tcp_nodelay.t b/stream_tcp_nodelay.t --- a/stream_tcp_nodelay.t +++ b/stream_tcp_nodelay.t @@ -117,7 +117,7 @@ sub stream_read { my ($buf); $s->blocking(0); - if (IO::Select->new($s)->can_read(3)) { + if (IO::Select->new($s)->can_read(5)) { $s->sysread($buf, 1024); }; diff --git a/stream_upstream.t b/stream_upstream.t --- a/stream_upstream.t +++ b/stream_upstream.t @@ -161,7 +161,7 @@ sub stream_read { my ($buf); $s->blocking(0); - if (IO::Select->new($s)->can_read(3)) { + if (IO::Select->new($s)->can_read(5)) { $s->sysread($buf, 1024); }; diff --git a/stream_upstream_hash.t b/stream_upstream_hash.t --- a/stream_upstream_hash.t +++ b/stream_upstream_hash.t @@ -138,7 +138,7 @@ sub stream_read { my ($buf); $s->blocking(0); - if (IO::Select->new($s)->can_read(3)) { + if (IO::Select->new($s)->can_read(5)) { $s->sysread($buf, 1024); }; diff --git a/stream_upstream_least_conn.t b/stream_upstream_least_conn.t --- a/stream_upstream_least_conn.t +++ b/stream_upstream_least_conn.t @@ -161,7 +161,7 @@ sub stream_read { my ($buf); $s->blocking(0); - if (IO::Select->new($s)->can_read(3)) { + if (IO::Select->new($s)->can_read(5)) { $s->sysread($buf, 1024); };