diff stream_unix.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 68d5a68eb938
children 882267679006
line wrap: on
line diff
--- a/stream_unix.t
+++ b/stream_unix.t
@@ -43,12 +43,12 @@ stream {
     }
 
     server {
-        listen       127.0.0.1:8080;
+        listen       127.0.0.1:%%PORT_0%%;
         proxy_pass   unix:%%TESTDIR%%/unix.sock;
     }
 
     server {
-        listen       127.0.0.1:8081;
+        listen       127.0.0.1:%%PORT_1%%;
         proxy_pass   u;
     }
 }
@@ -71,8 +71,8 @@ for (1 .. 50) {
 
 my $str = 'SEE-THIS';
 
-is(stream('127.0.0.1:8080')->io($str), $str, 'proxy');
-is(stream('127.0.0.1:8081')->io($str), $str, 'upstream');
+is(stream('127.0.0.1:' . port(0))->io($str), $str, 'proxy');
+is(stream('127.0.0.1:' . port(1))->io($str), $str, 'upstream');
 
 ###############################################################################