git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: c67c2e2) | patch
Add wait_for_subscription_sync for TAP tests.
Wed, 3 Aug 2022 10:01:17 +0000 (15:31 +0530)
Wed, 3 Aug 2022 10:01:17 +0000 (15:31 +0530)
commit 0c20dd33db1607d6a85ffce24238c1e55e384b49
Add wait_for_subscription_sync for TAP tests.

The TAP tests for logical replication in src/test/subscription are using
the following code in many places to make sure that the subscription is
synchronized with the publisher:

$node_publisher->wait_for_catchup('tap_sub');
$node_subscriber->poll_query_until('postgres',
qq[SELECT count(1) = 0
FROM pg_subscription_rel
WHERE srsubstate NOT IN ('r', 's')]);

The new function wait_for_subscription_sync() can be used to replace the
above code. This eliminates duplicated code and makes it easier to write
future tests.

Author: Masahiko Sawada
Reviewed by: Amit Kapila, Shi yu
Discussion: https://postgr.es/m/CAD21AoC-fvAkaKHa4t1urupwL8xbAcWRePeETvshvy80f6WV1A@mail.gmail.com
27 files changed:
src/test/perl/PostgreSQL/Test/Cluster.pm diff | blob | blame | history
src/test/subscription/t/001_rep_changes.pl diff | blob | blame | history
src/test/subscription/t/002_types.pl diff | blob | blame | history
src/test/subscription/t/004_sync.pl diff | blob | blame | history
src/test/subscription/t/005_encoding.pl diff | blob | blame | history
src/test/subscription/t/006_rewrite.pl diff | blob | blame | history
src/test/subscription/t/007_ddl.pl diff | blob | blame | history
src/test/subscription/t/008_diff_schema.pl diff | blob | blame | history
src/test/subscription/t/010_truncate.pl diff | blob | blame | history
src/test/subscription/t/011_generated.pl diff | blob | blame | history
src/test/subscription/t/013_partition.pl diff | blob | blame | history
src/test/subscription/t/014_binary.pl diff | blob | blame | history
src/test/subscription/t/015_stream.pl diff | blob | blame | history
src/test/subscription/t/016_stream_subxact.pl diff | blob | blame | history
src/test/subscription/t/017_stream_ddl.pl diff | blob | blame | history
src/test/subscription/t/018_stream_subxact_abort.pl diff | blob | blame | history
src/test/subscription/t/019_stream_subxact_ddl_abort.pl diff | blob | blame | history
src/test/subscription/t/021_twophase.pl diff | blob | blame | history
src/test/subscription/t/023_twophase_stream.pl diff | blob | blame | history
src/test/subscription/t/024_add_drop_pub.pl diff | blob | blame | history
src/test/subscription/t/025_rep_changes_for_schema.pl diff | blob | blame | history
src/test/subscription/t/027_nosuperuser.pl diff | blob | blame | history
src/test/subscription/t/028_row_filter.pl diff | blob | blame | history
src/test/subscription/t/029_on_error.pl diff | blob | blame | history
src/test/subscription/t/030_origin.pl diff | blob | blame | history
src/test/subscription/t/031_column_list.pl diff | blob | blame | history
src/test/subscription/t/100_bugs.pl diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /