Mercurial > hg > nginx-tests
comparison stream_limit_rate.t @ 710:aed139eaaf3f
Tests: fixed comment after 40675bfad7d3.
author | Andrey Zelenkov <zelenkov@nginx.com> |
---|---|
date | Wed, 23 Sep 2015 15:31:08 +0300 |
parents | 443848f28a73 |
children | 824754da4afc |
comparison
equal
deleted
inserted
replaced
709:ad8134cd6f45 | 710:aed139eaaf3f |
---|---|
114 is($r{'data'}, '1', 'upload - one byte'); | 114 is($r{'data'}, '1', 'upload - one byte'); |
115 | 115 |
116 } | 116 } |
117 | 117 |
118 # Five chunks are split with four 1s delays + 2s error: | 118 # Five chunks are split with four 1s delays + 2s error: |
119 # the first two chunks are halfs of test string | 119 # the first four chunks are quarters of test string |
120 # and the third one is some extra data from backend. | 120 # and the fifth one is some extra data from backend. |
121 | 121 |
122 %r = stream_get($str, peer => '127.0.0.1:8085'); | 122 %r = stream_get($str, peer => '127.0.0.1:8085'); |
123 my $diff = time() - $r{'time'}; | 123 my $diff = time() - $r{'time'}; |
124 cmp_ok(abs($diff - 4), '<=', 2, 'download - time'); | 124 cmp_ok(abs($diff - 4), '<=', 2, 'download - time'); |
125 is($r{'data'}, $str, 'download - data'); | 125 is($r{'data'}, $str, 'download - data'); |