# HG changeset patch # User Sergey Kandaurov # Date 1413537148 -14400 # Node ID c94fc8e41f5f9839fa208c343ebc96ed6b5dec58 # Parent 4e335141aa4b7085839ba4089153f90fb3059345 Tests: adjusted limit_conn_complex.t tests. Bump limit_req burst value to make a room for delaying a request for the second time. Wait to establish a preliminary connection that is used to exhaust the upper limit_conn limit before executing the limit_conn tests. diff --git a/limit_conn_complex.t b/limit_conn_complex.t --- a/limit_conn_complex.t +++ b/limit_conn_complex.t @@ -57,7 +57,7 @@ http { } location /req { - limit_req zone=req burst=1; + limit_req zone=req burst=2; } } } @@ -85,6 +85,7 @@ ok(IO::Select->new($s)->can_read(0.1), ' # limit_conn tests $s = http_get('/w', start => 1); +select undef, undef, undef, 0.2; like(http_get('/'), qr/^HTTP\/1.. 503 /, 'limit_conn same key'); unlike(http_get('/?c=2'), qr/^HTTP\/1.. 503 /, 'limit_conn different key');