# HG changeset patch # User Maxim Dounin # Date 1397585048 -14400 # Node ID 915ef26ac6ebdc642ddc1bbaf1658241a66fb473 # Parent 7a65ebfdb02eb42f99f29f61118e2927d25ebcd4 Tests: fix proxy_unfinished.t failures with big buffers. With newer systems it becomes common to use huge socket buffers, and the "no proxy temp" test may unexpectedly fail because disk buffering will not be used. To reduce this possibility, the "listen ... sndbuf=32k" was added. Additionally, regular expression was changed to silently allow full responses. diff --git a/proxy_unfinished.t b/proxy_unfinished.t --- a/proxy_unfinished.t +++ b/proxy_unfinished.t @@ -50,7 +50,7 @@ http { keys_zone=one:1m; server { - listen 127.0.0.1:8080; + listen 127.0.0.1:8080 sndbuf=32k; server_name localhost; location / { @@ -160,7 +160,7 @@ local $TODO = 'not yet' unless $t->has_v chmod(0000, $t->testdir() . '/proxy_temp'); like(http_get_11('/proxy/big.html', sleep => 0.5), - qr/X(?!.*\x0d\x0a?0\x0d\x0a?)/s, 'no proxy temp'); + qr/X(?!.*\x0d\x0a?0\x0d\x0a?)|finished/s, 'no proxy temp'); }