Mercurial > hg > nginx-tests
comparison 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 |
comparison
equal
deleted
inserted
replaced
968:ce687b25ea49 | 969:1edb092149e2 |
---|---|
477 my ($port, %extra) = @_; | 477 my ($port, %extra) = @_; |
478 my $npn = $extra{'npn'}; | 478 my $npn = $extra{'npn'}; |
479 my $alpn = $extra{'alpn'}; | 479 my $alpn = $extra{'alpn'}; |
480 my $s; | 480 my $s; |
481 | 481 |
482 $port = ($Test::Nginx::ports[0]{port} || 8080) unless defined $port; | 482 $port ||= port(8080); |
483 | 483 |
484 eval { | 484 eval { |
485 local $SIG{ALRM} = sub { die "timeout\n" }; | 485 local $SIG{ALRM} = sub { die "timeout\n" }; |
486 local $SIG{PIPE} = sub { die "sigpipe\n" }; | 486 local $SIG{PIPE} = sub { die "sigpipe\n" }; |
487 alarm(2); | 487 alarm(2); |