changeset 391:915ef26ac6eb

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.
author Maxim Dounin <mdounin@mdounin.ru>
date Tue, 15 Apr 2014 22:04:08 +0400
parents 7a65ebfdb02e
children c28ecaef065f
files proxy_unfinished.t
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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');
 
 }