mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-28 02:20:42 +00:00
Fix confusion between Postgres and pageserver connection string in test.
We passed the pageserver's libpq endpoint URL as the 'compute_ctl --connstr' argument, but that was bogus: the --connstr URL is supposed to be the URL to the *Postgres* instance that compute_ctl launches and monitors, not to the pageserver. compute_ctl does need the pageserver URL too, but it is read from the cluster spec JSON, not --connstr. That was pretty confusing, as you got a lot of "unknown command" errors in the pageserver log, when compute_tools tries to run regular SQL commands on the pageserver. The test still passed, however, as it doesn't require the SQL commands to succeed. But to make this less confusing, use an invalid hostname instead, so that the queries will fail to even connect.
This commit is contained in:
committed by
Heikki Linnakangas
parent
01778e37cc
commit
223834a420
@@ -179,7 +179,16 @@ def test_sync_safekeepers_logs(neon_env_builder: NeonEnvBuilder, pg_bin: PgBin):
|
||||
# run compute_ctl and wait for 10s
|
||||
try:
|
||||
ctl.raw_cli(
|
||||
["--connstr", ps_connstr, "--pgdata", pgdata, "--spec", spec, "--pgbin", pg_bin_path],
|
||||
[
|
||||
"--connstr",
|
||||
"postgres://invalid/",
|
||||
"--pgdata",
|
||||
pgdata,
|
||||
"--spec",
|
||||
spec,
|
||||
"--pgbin",
|
||||
pg_bin_path,
|
||||
],
|
||||
timeout=10,
|
||||
)
|
||||
except TimeoutExpired as exc:
|
||||
|
||||
Reference in New Issue
Block a user