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 index a0f22ff..e2da2d2 100644 --- a/stream_status_variable.t +++ b/stream_status_variable.t
@@ -72,12 +72,10 @@ 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(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();