diff stream_limit_rate.t @ 787:a53c310c695d

Tests: relaxed limit_rate tests timeouts.
author Sergey Kandaurov <pluknet@nginx.com>
date Mon, 16 Nov 2015 19:49:47 +0300
parents 824754da4afc
children 77359b849cd5
line wrap: on
line diff
--- a/stream_limit_rate.t
+++ b/stream_limit_rate.t
@@ -115,19 +115,19 @@ is($r{'data'}, '1', 'upload - one byte')
 
 }
 
-# Five chunks are split with four 1s delays + 2s error:
+# Five chunks are split with four 1s delays:
 # the first four chunks are quarters of test string
 # and the fifth one is some extra data from backend.
 
 %r = stream_get($str, peer =>  '127.0.0.1:8085');
 my $diff = time() - $r{'time'};
-cmp_ok(abs($diff - 4), '<=', 2, 'download - time');
+cmp_ok($diff, '>=', 4, 'download - time');
 is($r{'data'}, $str, 'download - data');
 
 my $time = time();
 %r = stream_get($str . 'close', peer => '127.0.0.1:8086');
 $diff = time() - $time;
-cmp_ok(abs($diff - 4), '<=', 2, 'upload - time');
+cmp_ok($diff, '>=', 4, 'upload - time');
 is($r{'data'}, $str . 'close', 'upload - data');
 
 ###############################################################################