add: Log pg version details of listener connection

Follow-up to #4617 adding more information to log entry produced upon successful listener connection establishement.
This commit is contained in:
Michał Kłeczek
2026-04-06 11:11:16 -05:00
committed by Steve Chavez
parent 34a767a5cc
commit b9c8562641
5 changed files with 21 additions and 13 deletions
+4 -2
View File
@@ -1667,9 +1667,11 @@ def test_log_listener_connection_start(defaultenv):
}
with run(env=env, no_startup_stdout=False, wait_for_readiness=True) as postgrest:
output = postgrest.read_stdout(nlines=5)
output = postgrest.read_stdout(nlines=10)
# Check for the listener start message containing host and port
# Do not check if pg version is displayed properly as it is tricky to test it
assert any(
f'Listener connected to "{defaultenv["PGHOST"]}:5432" and listening for database notifications on the "pgrst" channel'
f'"{defaultenv["PGHOST"]}:5432" and listening for database notifications on the "pgrst" channel'
in line
for line in output
)
+1 -1
View File
@@ -206,5 +206,5 @@ waitForObs (ObsChan orig copy) t msg f =
obsDiagMessage :: Observation -> Text
obsDiagMessage = \case
(HasqlPoolObs o) -> show o
o@(DBListenStart host port channel) -> constrName o <> show (host, port, channel)
o@(DBListenStart host port name channel) -> constrName o <> show (host, port, name, channel)
o -> constrName o