Mercurial > hg > nginx-tests
changeset 725:e5b1495299bd
Tests: made sure to test limit_conn with rate limited request.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Thu, 01 Oct 2015 12:45:58 +0300 |
parents | 4322541b80ed |
children | 22b06c04b37f |
files | limit_conn_complex.t |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/limit_conn_complex.t Wed Sep 30 17:54:12 2015 +0300 +++ b/limit_conn_complex.t Thu Oct 01 12:45:58 2015 +0300 @@ -40,6 +40,7 @@ %%TEST_GLOBALS_HTTP%% limit_req_zone $binary_remote_addr$arg_r zone=req:1m rate=1r/s; + limit_req_zone $binary_remote_addr zone=re2:1m rate=1r/s; limit_conn_zone $binary_remote_addr$arg_c zone=conn:1m; server { @@ -52,12 +53,16 @@ location /w { limit_conn conn 1; - proxy_pass http://127.0.0.1:8080/req; + proxy_pass http://127.0.0.1:8080/req2; } location /req { limit_req zone=req burst=2; } + + location /req2 { + limit_req zone=re2 burst=2; + } } } @@ -83,6 +88,8 @@ # limit_conn tests +http_get('/req2'); + $s = http_get('/w', start => 1); select undef, undef, undef, 0.2;