# HG changeset patch # User Sergey Kandaurov # Date 1507905730 -10800 # Node ID 31045e6397324892a368a4606e5429422504649e # Parent a79bf84726af77abab72e381f828234f71289a28 Tests: fixed stream_status_variable.t transient failure on win32. Use "listen .. proxy_protocol" to hold connections on stream backend and trigger stream status 503 by limiting access by the number of connections. The previous approach using proxy_download_rate doesn't work well on win32, since WSARecv() fails on pending data after backend closed the connection. diff --git a/stream_status_variable.t b/stream_status_variable.t --- a/stream_status_variable.t +++ b/stream_status_variable.t @@ -72,12 +72,10 @@ stream { limit_conn zone 1; proxy_pass 127.0.0.1:8086; access_log %%TESTDIR%%/503.log status; - - proxy_download_rate 1; } server { - listen 127.0.0.1:8086; + listen 127.0.0.1:8086 proxy_protocol; return SEE-THIS; } } @@ -94,9 +92,7 @@ stream('127.0.0.1:' . port(8082))->read( stream('127.0.0.1:' . port(8084))->read(); my $s = stream('127.0.0.1:' . port(8085)); -$s->write('busy'); stream('127.0.0.1:' . port(8085))->read(); -$s->read(); undef $s; $t->stop();