summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2019-09-09 18:21:40 +0000
committerTom Lane2019-09-09 18:21:47 +0000
commit5348e22b969f6af8bd4400256a6a190721a01f34 (patch)
treead5da6810af58959b013fcfc09f6d1dd2af64231
parent9668b02f80425dc72116101cb368c6ac1cc210a1 (diff)
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/[email protected]
-rw-r--r--src/test/ldap/t/001_auth.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/ldap/t/001_auth.pl b/src/test/ldap/t/001_auth.pl
index daa2270cdfa..f8941144f5e 100644
--- a/src/test/ldap/t/001_auth.pl
+++ b/src/test/ldap/t/001_auth.pl
@@ -56,7 +56,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';