pgsql: pg_createsubscriber: Fix matching check in TAP test

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: pg_createsubscriber: Fix matching check in TAP test
Date: 2025-10-17 04:01:32
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

pg_createsubscriber: Fix matching check in TAP test

040_pg_createsubscriber has been calling safe_psql(), that returns the
result of a SQL query, with ok() without checking the result generated
(in this case 't', for a number of publications).

The outcome of the tests is currently not impacted by this change.
However, it could be possible that the test fails to detect future
issues if the query results become different.

The test is rewritten so as the number of publications is checked. This
is not the fix suggested originally by the author, but this is more
reliable in the long run.

Oversight in e5aeed4b8020.

Author: Sadhuprasad Patro <b(dot)sadhu(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAFF0-CHhwNx_Cv2uy7tKjODUbeOgPrJpW4Rpf1jqB16_1bU2sg@mail.gmail.com
Backpatch-through: 18

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/39e22b3adaa7738da4d7ff536a2ab5e303e7c890

Modified Files
--------------
src/bin/pg_basebackup/t/040_pg_createsubscriber.pl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2025-10-17 04:06:40 pgsql: Fix matching check in recovery test 042_low_level_backup
Previous Message Álvaro Herrera 2025-10-16 18:31:01 pgsql: Fix update-po for the PGXS case