Mercurial > hg > nginx-tests
comparison stream_limit_rate.t @ 637:443848f28a73
Tests: whitespace fix.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Tue, 28 Jul 2015 01:46:32 +0300 |
parents | 40675bfad7d3 |
children | aed139eaaf3f |
comparison
equal
deleted
inserted
replaced
636:1925b27f24b6 | 637:443848f28a73 |
---|---|
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 two chunks are halfs of test string |
120 # and the third one is some extra data from backend. | 120 # and the third 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'); |