Skip to content

Commit 7ac5d9b

Browse files
committed
PostgresNode: wrap correctly around port number range end
Per note from Tom Lane
1 parent 7e19db0 commit 7ac5d9b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/test/perl/PostgresNode.pm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,8 @@ sub get_new_node
321321

322322
while ($found == 0)
323323
{
324-
$port++;
324+
# wrap correctly around range end
325+
$port = 49152 if ++$port >= 65536;
325326
print "# Checking for port $port\n";
326327
if (!TestLib::run_log([ 'pg_isready', '-p', $port ]))
327328
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy