Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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

+2-1
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)