comparison proxy.t @ 795:122cd3a82367

Tests: fixed 'proxy connect timeout' test timeouts on slow hosts. The previous value might not be enough to connect.
author Sergey Kandaurov <pluknet@nginx.com>
date Mon, 07 Dec 2015 13:38:52 +0300
parents 984bfe661cce
children eca9b1d19021
comparison
equal deleted inserted replaced
794:fed83003c45c 795:122cd3a82367
40 server_name localhost; 40 server_name localhost;
41 41
42 location / { 42 location / {
43 proxy_pass http://127.0.0.1:8081; 43 proxy_pass http://127.0.0.1:8081;
44 proxy_read_timeout 1s; 44 proxy_read_timeout 1s;
45 proxy_connect_timeout 1s; 45 proxy_connect_timeout 2s;
46 } 46 }
47 47
48 location /var { 48 location /var {
49 proxy_pass http://$arg_b; 49 proxy_pass http://$arg_b;
50 proxy_read_timeout 1s; 50 proxy_read_timeout 1s;
66 66
67 like(http_get('/var?b=127.0.0.1:8081/'), qr/SEE-THIS/, 'proxy with variables'); 67 like(http_get('/var?b=127.0.0.1:8081/'), qr/SEE-THIS/, 'proxy with variables');
68 68
69 my $s = http('', start => 1); 69 my $s = http('', start => 1);
70 70
71 sleep 2; 71 sleep 3;
72 72
73 like(http_get('/', socket => $s), qr/200 OK/, 'proxy connect timeout'); 73 like(http_get('/', socket => $s), qr/200 OK/, 'proxy connect timeout');
74 74
75 ############################################################################### 75 ###############################################################################
76 76