pgsql: Make test_target_session_attrs more robust against connection fa

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Make test_target_session_attrs more robust against connection fa
Date: 2021-03-03 18:51:48
Message-ID: E1lHWb6-0000VP-RU@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Make test_target_session_attrs more robust against connection failure.

Feed the desired command to psql via "-c" not stdin, else Perl
may complain that it can't push stdin to an already-failed psql
process, as seen in intermittent buildfarm failures.

Make some minor cosmetic improvements while at it.

Before commit ee28cacf6 we had no tests here that expected failure
to connect, so there seems no need for a back-patch.

Discussion: https://postgr.es/m/CALDaNm2mo8YED=M2ZJKGf1U3F3mw6SaQuLXWCK8rZP6sECYcrA@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3769e11a31831fc2f3bd4c4a24b4f45c352fb8fb

Modified Files
--------------
src/test/recovery/t/001_stream_rep.pl | 25 ++++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2021-03-03 20:28:52 Re: pgsql: pg_upgrade: Check version of target cluster binaries
Previous Message Peter Eisentraut 2021-03-03 08:57:55 pgsql: pg_upgrade: Check version of target cluster binaries