diff proxy_cache_lock.t @ 952:e9064d691790

Tests: converted tests to run in parallel.
author Andrey Zelenkov <zelenkov@nginx.com>
date Tue, 21 Jun 2016 16:39:13 +0300
parents ee7e07d826b8
children 882267679006
line wrap: on
line diff
--- a/proxy_cache_lock.t
+++ b/proxy_cache_lock.t
@@ -38,18 +38,18 @@ http {
                        keys_zone=NAME:1m;
 
     server {
-        listen       127.0.0.1:8080;
+        listen       127.0.0.1:%%PORT_0%%;
         server_name  localhost;
 
         location / {
-            proxy_pass    http://127.0.0.1:8081;
+            proxy_pass    http://127.0.0.1:%%PORT_1%%;
             proxy_cache   NAME;
 
             proxy_cache_lock on;
         }
 
         location /timeout {
-            proxy_pass    http://127.0.0.1:8081;
+            proxy_pass    http://127.0.0.1:%%PORT_1%%;
             proxy_cache   NAME;
 
             proxy_cache_lock on;
@@ -57,7 +57,7 @@ http {
         }
 
         location /nolock {
-            proxy_pass    http://127.0.0.1:8081;
+            proxy_pass    http://127.0.0.1:%%PORT_1%%;
             proxy_cache   NAME;
         }
     }
@@ -69,7 +69,7 @@ EOF
 
 $t->run();
 
-$t->waitforsocket('127.0.0.1:8081');
+$t->waitforsocket('127.0.0.1:' . port(1));
 
 ###############################################################################
 
@@ -126,7 +126,7 @@ like(http_get('/nolock'), qr/request 3/,
 sub http_fake_daemon {
 	my $server = IO::Socket::INET->new(
 		Proto => 'tcp',
-		LocalAddr => '127.0.0.1:8081',
+		LocalAddr => '127.0.0.1:' . port(1),
 		Listen => 5,
 		Reuse => 1
 	)