Mercurial > hg > nginx-tests
diff stream_error_log.t @ 565:ff49e1c00b35
Tests: in stream tests, try to read all the data where appropriate.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Wed, 29 Apr 2015 14:58:27 +0300 |
parents | abf5f3197967 |
children | 22bade4c7e12 |
line wrap: on
line diff
--- a/stream_error_log.t Mon Apr 27 17:18:10 2015 +0300 +++ b/stream_error_log.t Wed Apr 29 14:58:27 2015 +0300 @@ -170,10 +170,12 @@ $peer = '127.0.0.1:8080' unless defined $peer; my $s = stream_connect($peer); stream_write($s, $data); - my $r = stream_read($s); - $s->close; - return $r; + $data = ''; + while (my $buf = stream_read($s)) { + $data .= $buf; + } + return $data; } sub stream_connect {