From: Daniel Gustafsson <dgustafsson@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Refactor background psql TAP functions
Date: Fri, 07 Apr 2023 20:21:44 +0000
Message-ID: <E1pksad-001uk0-CL@gemulon.postgresql.org> (raw)
Refactor background psql TAP functions
This breaks out the background and interactive psql functionality into a
new class, PostgreSQL::Test::BackgroundPsql. Sessions are still initiated
via PostgreSQL::Test::Cluster, but once started they can be manipulated by
the new helper functions which intend to make querying easier. A sample
session for a command which can be expected to finish at a later time can
be seen below.
my $session = $node->background_psql('postgres');
$bsession->query_until(qr/start/, q(
\echo start
CREATE INDEX CONCURRENTLY idx ON t(a);
));
$bsession->quit;
Patch by Andres Freund with some additional hacking by me.
Author: Andres Freund <andres@anarazel.de>
Reviewed-by: Andrew Dunstan <andrew@dunslane.net>
Discussion: https://postgr.es/m/20230130194350.zj5v467x4jgqt3d6@awork3.anarazel.de
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/664d757531e11ea5ef6971884ddb2a7af6fae69a
Modified Files
--------------
contrib/amcheck/t/003_cic_2pc.pl | 70 ++---
src/bin/psql/t/010_tab_completion.pl | 28 +-
src/test/perl/PostgreSQL/Test/BackgroundPsql.pm | 299 +++++++++++++++++++++
src/test/perl/PostgreSQL/Test/Cluster.pm | 79 ++----
.../recovery/t/010_logical_decoding_timelines.pl | 1 -
src/test/recovery/t/031_recovery_conflict.pl | 102 ++-----
src/test/subscription/t/015_stream.pl | 51 ++--
7 files changed, 388 insertions(+), 242 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: dgustafsson@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Refactor background psql TAP functions
In-Reply-To: <E1pksad-001uk0-CL@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox