comparison lib/Test/Nginx/Stream.pm @ 1235:3fc6817cd84a

Tests: explicit peer port in stream tests now required. Notably, this eliminates extra port acquire for the default port number in cases when it was not actually used.
author Andrey Zelenkov <zelenkov@nginx.com>
date Thu, 26 Oct 2017 16:36:13 +0300
parents 91e64c1ceec9
children 29d0961bc3f7
comparison
equal deleted inserted replaced
1234:0defcc1c87ab 1235:3fc6817cd84a
39 unshift(@_, "PeerAddr") if @_ == 1; 39 unshift(@_, "PeerAddr") if @_ == 1;
40 40
41 $self->{_socket} = IO::Socket::INET->new( 41 $self->{_socket} = IO::Socket::INET->new(
42 Proto => "tcp", 42 Proto => "tcp",
43 PeerAddr => '127.0.0.1', 43 PeerAddr => '127.0.0.1',
44 PeerPort => port(8080),
45 @_ 44 @_
46 ) 45 )
47 or die "Can't connect to nginx: $!\n"; 46 or die "Can't connect to nginx: $!\n";
48 47
49 if ({@_}->{'SSL'}) { 48 if ({@_}->{'SSL'}) {