diff lib/Test/Nginx/HTTP2.pm @ 951:9361c7eddfc1

Tests: parallel tests support.
author Andrey Zelenkov <zelenkov@nginx.com>
date Tue, 21 Jun 2016 16:37:58 +0300
parents c657aaffdaa8
children 1edb092149e2
line wrap: on
line diff
--- a/lib/Test/Nginx/HTTP2.pm
+++ b/lib/Test/Nginx/HTTP2.pm
@@ -479,7 +479,7 @@ sub new_socket {
 	my $alpn = $extra{'alpn'};
 	my $s;
 
-	$port = 8080 unless defined $port;
+	$port = ($Test::Nginx::ports[0]{port} || 8080) unless defined $port;
 
 	eval {
 		local $SIG{ALRM} = sub { die "timeout\n" };