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