diff options
author | Andrew Dunstan <andrew@dunslane.net> | 2024-07-08 05:51:26 -0400 |
---|---|---|
committer | Andrew Dunstan <andrew@dunslane.net> | 2024-07-08 11:40:58 -0400 |
commit | 198088dc63de4f89835419969c7b5d1640be3441 (patch) | |
tree | 94a235d401b83ea9d0e346357e17165b373eef8a /src | |
parent | 8badee7875c0eac9e2c4fd61f23eceaa64276b3f (diff) | |
download | postgresql-198088dc63de4f89835419969c7b5d1640be3441.tar.gz postgresql-198088dc63de4f89835419969c7b5d1640be3441.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).
Diffstat (limited to 'src')
-rw-r--r-- | src/test/ssl/t/SSLServer.pm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/ssl/t/SSLServer.pm b/src/test/ssl/t/SSLServer.pm index d25c38dbbc7..b8ef902bf86 100644 --- a/src/test/ssl/t/SSLServer.pm +++ b/src/test/ssl/t/SSLServer.pm @@ -42,6 +42,13 @@ our @EXPORT = qw( test_connect_ok ); +# 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, it will run after the INIT block in PostgresNode.pm, +# as they run in order of definition (see perlmod). + +INIT { $PostgresNode::use_tcp = 1; } + # Define a couple of helper functions to test connecting to the server. # The first argument is a base connection string to use for connection. |