# HG changeset patch # User Sergey Kandaurov # Date 1443692758 -10800 # Node ID e5b1495299bd250949d11d523c0529eb58168d96 # Parent 4322541b80ed572e13533d48e18f1d1700a6980a Tests: made sure to test limit_conn with rate limited request. diff --git a/limit_conn_complex.t b/limit_conn_complex.t --- a/limit_conn_complex.t +++ b/limit_conn_complex.t @@ -40,6 +40,7 @@ http { %%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 @@ http { 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 @@ ok(IO::Select->new($s)->can_read(0.1), ' # limit_conn tests +http_get('/req2'); + $s = http_get('/w', start => 1); select undef, undef, undef, 0.2;