Mercurial > hg > nginx-tests
changeset 172:d099e407fff5
Tests: tune sleep in limit_req.t to avoid spurious timeouts.
Tune sleep and increase rate accordingly (we have to sleep for at a delay
time and a bit more). This should still catch the original problem since
0.8.38 (where delay time for rates different from 1r/s was fixed).
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Wed, 31 Aug 2011 14:43:16 +0400 |
parents | cfb8147f19a7 |
children | 20d3461de9da |
files | limit_req.t |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/limit_req.t Tue Aug 30 18:32:14 2011 +0400 +++ b/limit_req.t Wed Aug 31 14:43:16 2011 +0400 @@ -35,8 +35,8 @@ http { %%TEST_GLOBALS_HTTP%% - limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s; - limit_req_zone $binary_remote_addr zone=long:10m rate=1r/s; + limit_req_zone $binary_remote_addr zone=one:10m rate=2r/s; + limit_req_zone $binary_remote_addr zone=long:10m rate=2r/s; limit_req_zone $binary_remote_addr zone=fast:10m rate=1000r/s; server { @@ -74,7 +74,7 @@ # before reading response. my $l1 = length(http_get('/long.html')); -my $l2 = length(http_get('/long.html', sleep => 1.1)); +my $l2 = length(http_get('/long.html', sleep => 0.6)); is($l2, $l1, 'delayed big request not truncated'); # make sure rejected requests are not counted, and access is again allowed