comparison limit_conn_complex.t @ 826:64abcc611242

Tests: adjusted limit_conn_complex.t test timeouts.
author Sergey Kandaurov <pluknet@nginx.com>
date Wed, 27 Jan 2016 15:22:05 +0300
parents 47139a1ce06e
children e9064d691790
comparison
equal deleted inserted replaced
825:ff8c68cd2be4 826:64abcc611242
37 } 37 }
38 38
39 http { 39 http {
40 %%TEST_GLOBALS_HTTP%% 40 %%TEST_GLOBALS_HTTP%%
41 41
42 limit_req_zone $binary_remote_addr$arg_r zone=req:1m rate=30r/m; 42 limit_req_zone $binary_remote_addr$arg_r zone=req:1m rate=1r/m;
43 limit_req_zone $binary_remote_addr zone=re2:1m rate=30r/m; 43 limit_req_zone $binary_remote_addr zone=re2:1m rate=1r/m;
44 limit_conn_zone $binary_remote_addr$arg_c zone=conn:1m; 44 limit_conn_zone $binary_remote_addr$arg_c zone=conn:1m;
45 45
46 server { 46 server {
47 listen 127.0.0.1:8080; 47 listen 127.0.0.1:8080;
48 server_name localhost; 48 server_name localhost;
79 http_get('/req'); 79 http_get('/req');
80 80
81 # limit_req tests 81 # limit_req tests
82 82
83 $s = http_get('/req', start => 1); 83 $s = http_get('/req', start => 1);
84 ok(!IO::Select->new($s)->can_read(0.1), 'limit_req same key'); 84 ok(!IO::Select->new($s)->can_read(1), 'limit_req same key');
85 85
86 $s = http_get('/req?r=2', start => 1); 86 $s = http_get('/req?r=2', start => 1);
87 ok(IO::Select->new($s)->can_read(0.1), 'limit_req different key'); 87 ok(IO::Select->new($s)->can_read(1), 'limit_req different key');
88 88
89 # limit_conn tests 89 # limit_conn tests
90 90
91 http_get('/req2'); 91 http_get('/req2');
92 92