pgsql: Improve stability of subscription/029_on_error.pl

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Improve stability of subscription/029_on_error.pl
Date: 2024-05-24 02:21:55
Message-ID: E1sAKZ9-001Wd8-KL@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Improve stability of subscription/029_on_error.pl

This test was failing when using wal_debug=on and -DWAL_DEBUG because of
additional log entries that made the test grab an LSN not mapping with
the error expected in the test.

Previously the test would look for the first matching line to get the
LSN to skip up to. This is improved by having the test scan the logs
with a regexp that checks for the expected ERROR string, ensuring that
the wanted LSN comes from the correct context.

Backpatch down to 15 where this test has been introduced.

Author: Ian Ilyasov
Discussion: https://postgr.es/m/GV1P251MB100415F17E6B2FDD7188777ECDE32@GV1P251MB1004.EURP251.PROD.OUTLOOK.COM
Backpatch-through: 15

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ac8c85d04b133509071b1de60a027ebe00654696

Modified Files
--------------
src/test/subscription/t/029_on_error.pl | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2024-05-24 04:42:45 pgsql: Fix comment in 024_add_drop_pub.pl
Previous Message Tom Lane 2024-05-23 19:52:27 pgsql: Remove race conditions between ECPGdebug() and ecpg_log().