aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2024-07-08 05:51:26 -0400
committerAndrew Dunstan <andrew@dunslane.net>2024-07-08 11:40:58 -0400
commit81749aa39ec32a8dcb008448fa245b24639861f7 (patch)
treec621704779b0d6271bff7ec479f97d8096976851
parenta3c0124f69ffd2a299f099d4037ba8c6d2293aba (diff)
downloadpostgresql-81749aa39ec32a8dcb008448fa245b24639861f7.tar.gz
postgresql-81749aa39ec32a8dcb008448fa245b24639861f7.zip
Force nodes for SSL tests to start in TCP mode
Currently they are started in unix socket mode in ost cases, and then converted to run in TCP mode. This can result in port collisions, and there is no virtue in startng in unix socket mode, so start as we will be going on. Discussion: https://postgr.es/m/d6ee8761-39d1-0033-1afb-d5a57ee056f2@gmail.com Backpatch to all live branches (12 and up).
-rw-r--r--src/test/ssl/t/SSLServer.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/ssl/t/SSLServer.pm b/src/test/ssl/t/SSLServer.pm
index 804d0082452..519ac221d6f 100644
--- a/src/test/ssl/t/SSLServer.pm
+++ b/src/test/ssl/t/SSLServer.pm
@@ -42,6 +42,12 @@ our @EXPORT = qw(
switch_server_cert
);
+# Force SSL tests nodes to begin in TCP mode. They won't work in Unix Socket
+# mode and this way they will find a port to run on in a more robust way.
+# Use an INIT block so it runs after the BEGIN block in TestLib.pm.
+
+INIT { $TestLib::use_unix_sockets = 0; }
+
# Copy a set of files, taking into account wildcards
sub copy_files
{