diff options
-rw-r--r-- | src/test/perl/PostgresNode.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/perl/PostgresNode.pm b/src/test/perl/PostgresNode.pm index b18c6bf33c6..7b6ddf25de9 100644 --- a/src/test/perl/PostgresNode.pm +++ b/src/test/perl/PostgresNode.pm @@ -321,7 +321,8 @@ sub get_new_node while ($found == 0) { - $port++; + # wrap correctly around range end + $port = 49152 if ++$port >= 65536; print "# Checking for port $port\n"; if (!TestLib::run_log([ 'pg_isready', '-p', $port ])) { |