Mercurial > hg > nginx-tests
diff stream_upstream.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 | cd3e32d9997e |
children | 824754da4afc |
line wrap: on
line diff
--- a/stream_upstream.t Mon Apr 27 17:18:10 2015 +0300 +++ b/stream_upstream.t Wed Apr 29 14:58:27 2015 +0300 @@ -119,10 +119,12 @@ 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 {