postgres.git / summary / log / commit / refs
commit 8459f908c6166e0249c310a03a3d1265ff7b7972
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: Mon Sep 09 18:21:40 2019 +0000
First released in: 13.0, 11.6, 12.0
Be more careful about port selection in src/test/ldap/.
Don't just assume that the next port is free; it might not be, or
if we're really unlucky it might even be out of the TCP range.
Do it honestly with two get_free_port() calls instead.
This is surely a pretty low-probability problem, but I think it
explains a buildfarm failure seen today, so let's fix it.
Back-patch to v11 where this script was added.
Discussion: https://postgr.es/m/25124.1568052346@sss.pgh.pa.us
src/test/ldap/t/001_auth.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/test/ldap/t/001_auth.pl b/src/test/ldap/t/001_auth.pl
index b0fa3318a38..6e4cad98e67 100644
--- a/src/test/ldap/t/001_auth.pl
+++ b/src/test/ldap/t/001_auth.pl
@@ -49,7 +49,7 @@ my $slapd_logfile = "${TestLib::log_path}/slapd.log";
my $ldap_conf = "${TestLib::tmp_check}/ldap.conf";
my $ldap_server = 'localhost';
my $ldap_port = get_free_port();
-my $ldaps_port = $ldap_port + 1;
+my $ldaps_port = get_free_port();
my $ldap_url = "ldap://$ldap_server:$ldap_port";
my $ldaps_url = "ldaps://$ldap_server:$ldaps_port";
my $ldap_basedn = 'dc=example,dc=net';
[parent: eec51447012a]