Mercurial > hg > nginx-tests
diff lib/Test/Nginx/POP3.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 | 575d39cc0e35 |
line wrap: on
line diff
--- a/lib/Test/Nginx/POP3.pm +++ b/lib/Test/Nginx/POP3.pm @@ -21,7 +21,7 @@ sub new { $self->{_socket} = IO::Socket::INET->new( Proto => "tcp", - PeerAddr => "127.0.0.1:8110", + PeerAddr => "127.0.0.1:" . port(8110), @_ ) or die "Can't connect to nginx: $!\n"; @@ -93,7 +93,7 @@ sub pop3_test_daemon { my $server = IO::Socket::INET->new( Proto => 'tcp', - LocalAddr => '127.0.0.1:' . ($port || 8111), + LocalAddr => '127.0.0.1:' . ($port || port(8111)), Listen => 5, Reuse => 1 )