changeset 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 fed83003c45c
children 92375c379a0a
files proxy.t proxy_ssl.t stream_proxy.t stream_proxy_ssl.t
diffstat 4 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/proxy.t
+++ b/proxy.t
@@ -42,7 +42,7 @@ http {
         location / {
             proxy_pass http://127.0.0.1:8081;
             proxy_read_timeout 1s;
-            proxy_connect_timeout 1s;
+            proxy_connect_timeout 2s;
         }
 
         location /var {
@@ -68,7 +68,7 @@ like(http_get('/var?b=127.0.0.1:8081/'),
 
 my $s = http('', start => 1);
 
-sleep 2;
+sleep 3;
 
 like(http_get('/', socket => $s), qr/200 OK/, 'proxy connect timeout');
 
--- a/proxy_ssl.t
+++ b/proxy_ssl.t
@@ -62,7 +62,7 @@ http {
 
         location /timeout {
             proxy_pass https://127.0.0.1:8081/;
-            proxy_connect_timeout 1s;
+            proxy_connect_timeout 2s;
         }
     }
 }
@@ -100,7 +100,7 @@ like(http_get('/ssl_reuse'), qr/200 OK.*
 
 my $s = http('', start => 1);
 
-sleep 2;
+sleep 3;
 
 like(http_get('/timeout', socket => $s), qr/200 OK/, 'proxy connect timeout');
 
--- a/stream_proxy.t
+++ b/stream_proxy.t
@@ -38,7 +38,7 @@ stream {
     server {
         listen      127.0.0.1:8080;
         proxy_pass  127.0.0.1:8081;
-        proxy_connect_timeout 1s;
+        proxy_connect_timeout 2s;
     }
 }
 
@@ -65,7 +65,7 @@ is(stream_read($s), '', 'proxy connectio
 
 $s = stream_connect();
 
-sleep 2;
+sleep 3;
 
 stream_write($s, 'foo');
 is(stream_read($s), 'bar', 'proxy connect timeout');
--- a/stream_proxy_ssl.t
+++ b/stream_proxy_ssl.t
@@ -37,7 +37,7 @@ events {
 stream {
     proxy_ssl on;
     proxy_ssl_session_reuse on;
-    proxy_connect_timeout 1s;
+    proxy_connect_timeout 2s;
 
     server {
         listen      127.0.0.1:8080;
@@ -106,7 +106,7 @@ like(http_get('/', socket => getconn('12
 
 my $s = http('', start => 1);
 
-sleep 2;
+sleep 3;
 
 like(http_get('/', socket => $s), qr/200 OK/, 'proxy connect timeout');