changeset 477:c94fc8e41f5f

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.
author Sergey Kandaurov <pluknet@nginx.com>
date Fri, 17 Oct 2014 13:12:28 +0400
parents 4e335141aa4b
children fec6dc7e0fc3
files limit_conn_complex.t
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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');