diff lib/Test/Nginx/HTTP2.pm @ 969:1edb092149e2

Tests: simplified parallel tests. Now configurations are automatically scanned for "127.0.0.1:8xxx", and ports are auto-replaced by free ones. The exact port specified is used if it's free.
author Maxim Dounin <mdounin@mdounin.ru>
date Fri, 08 Jul 2016 02:21:14 +0300
parents 9361c7eddfc1
children 4a915c4489cc
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 = ($Test::Nginx::ports[0]{port} || 8080) unless defined $port;
+	$port ||= port(8080);
 
 	eval {
 		local $SIG{ALRM} = sub { die "timeout\n" };