Refactor subscription tests to use PostgresNode's wait_for_catchup
authorPeter Eisentraut <peter_e@gmx.net>
Mon, 8 Jan 2018 22:32:09 +0000 (17:32 -0500)
committerPeter Eisentraut <peter_e@gmx.net>
Thu, 11 Jan 2018 18:35:38 +0000 (13:35 -0500)
commitbbd3363e128daec0e70952c1bb2f12ab1f6f1292
tree3713cabf22276c9d50b0f40acdde71d7272297fd
parent4d41b2e0926548e338d20875729a55d41289f867
Refactor subscription tests to use PostgresNode's wait_for_catchup

This was nearly the same code.  Extend wait_for_catchup to allow waiting
for pg_current_wal_lsn() and use that in the subscription tests.  Also
change one use in the pg_rewind tests to use this.

Also remove some broken code in wait_for_catchup and
wait_for_slot_catchup.  The error message in case the waiting failed
wanted to show the current LSN, but the way it was written never
worked.  So since nobody ever cared, just remove it.

Reviewed-by: Michael Paquier <michael.paquier@gmail.com>
src/bin/pg_rewind/RewindTest.pm
src/test/perl/PostgresNode.pm
src/test/subscription/t/001_rep_changes.pl
src/test/subscription/t/002_types.pl
src/test/subscription/t/003_constraints.pl
src/test/subscription/t/004_sync.pl
src/test/subscription/t/005_encoding.pl
src/test/subscription/t/006_rewrite.pl
src/test/subscription/t/007_ddl.pl
src/test/subscription/t/008_diff_schema.pl