Mercurial > hg > nginx-tests
diff proxy_request_buffering.t @ 837:68a6678abae2
Tests: improved logging for unbuffered request body tests.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Fri, 29 Jan 2016 16:12:42 +0300 |
parents | 907e89fba9c3 |
children | e9064d691790 |
line wrap: on
line diff
--- a/proxy_request_buffering.t Fri Jan 29 00:40:05 2016 +0300 +++ b/proxy_request_buffering.t Fri Jan 29 16:12:42 2016 +0300 @@ -207,6 +207,8 @@ $client = $server->accept(); + log2c("(new connection $client)"); + alarm(0); }; alarm(0); @@ -216,6 +218,8 @@ } $client->sysread(my $buf, 1024); + log2i($buf); + $buf =~ s/.*?\x0d\x0a?\x0d\x0a?(.*)/$1/ms; my $f = { preread => $buf }; @@ -227,8 +231,11 @@ local $SIG{PIPE} = sub { die "sigpipe\n" }; alarm(5); + log_out($buf); $s->write($buf); + $client->sysread($buf, 1024); + log2i($buf); alarm(0); }; @@ -259,6 +266,7 @@ alarm(5); $s->sysread($buf, 1024); + log_in($buf); alarm(0); }; @@ -273,4 +281,8 @@ return $f; } +sub log2i { Test::Nginx::log_core('|| <<', @_); } +sub log2o { Test::Nginx::log_core('|| >>', @_); } +sub log2c { Test::Nginx::log_core('||', @_); } + ###############################################################################