diff stream_proxy.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 77359b849cd5
children 882267679006
line wrap: on
line diff
--- a/stream_proxy.t
+++ b/stream_proxy.t
@@ -37,8 +37,8 @@ events {
 
 stream {
     server {
-        listen      127.0.0.1:8080;
-        proxy_pass  127.0.0.1:8081;
+        listen      127.0.0.1:%%PORT_0%%;
+        proxy_pass  127.0.0.1:%%PORT_1%%;
         proxy_connect_timeout 2s;
     }
 }
@@ -46,7 +46,7 @@ stream {
 EOF
 
 $t->run_daemon(\&stream_daemon);
-$t->run()->waitforsocket('127.0.0.1:8081');
+$t->run()->waitforsocket('127.0.0.1:' . port(1));
 
 ###############################################################################
 
@@ -68,7 +68,7 @@ is($s->io('foo', length => 3), 'bar', 'p
 sub stream_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
 	)