diff options
| author | Alvaro Herrera | 2015-12-07 23:06:21 +0000 |
|---|---|---|
| committer | Alvaro Herrera | 2015-12-07 23:06:21 +0000 |
| commit | 7ac5d9b31637b1856c7ac9cb625bcca694a2790a (patch) | |
| tree | c7252ce2e1b60808152085211956090e1b664cee /src/test | |
| parent | 7e19db0c09719d7919a8fdd96a1fffe7efd2df93 (diff) | |
PostgresNode: wrap correctly around port number range end
Per note from Tom Lane
Diffstat (limited to 'src/test')
| -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 ])) { |
