diff stream_udp_upstream_least_conn.t @ 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 196d33c2bb45
children e4974af3fb12
line wrap: on
line diff
--- a/stream_udp_upstream_least_conn.t
+++ b/stream_udp_upstream_least_conn.t
@@ -66,7 +66,7 @@ is(many(10), "$port1: 5, $port2: 5", 'ba
 
 my @sockets;
 for (1 .. 2) {
-	my $s = dgram();
+	my $s = dgram('127.0.0.1:' . port(8080));
 	$s->write('w');
 	push @sockets, $s;
 }
@@ -82,7 +82,7 @@ sub many {
 	my (%ports);
 
 	for (1 .. $count) {
-		if (dgram()->io('.') =~ /(\d+)/) {
+		if (dgram('127.0.0.1:' . port(8080))->io('.') =~ /(\d+)/) {
 			$ports{$1} = 0 unless defined $ports{$1};
 			$ports{$1}++;
 		}