pgsql: Refactor and fix TAP tests of pg_rewind

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Refactor and fix TAP tests of pg_rewind
Date: 2015-04-13 15:12:08
Message-ID: E1Yhg1w-0004nj-Gc@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Refactor and fix TAP tests of pg_rewind

* Don't pass arguments to prove, since that's not supported on perl 5.8
which is the minimum version supported by the TAP tests. Refactor the
test files themselves to run the tests twice, in both local and remote mode.

* Use eq rather than == for string comparison. This thinko caused the remote
versions of the tests to never run.

* Add "use strict" and "use warnings", and fix warnings that that produced.

* Increase the delay after standby promotion, to make the tests more robust.

* In remote mode, the connection string to the promoted standby was
incorrect, leading to connection errors.

Patch by Michael Paquier, to address Peter Eisentraut's report.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/53ba10770a315361770efdc17d2c01f6a30e3e3d

Modified Files
--------------
src/bin/pg_rewind/Makefile | 5 +-
src/bin/pg_rewind/RewindTest.pm | 24 +++++---
src/bin/pg_rewind/t/001_basic.pl | 105 +++++++++++++++++---------------
src/bin/pg_rewind/t/002_databases.pl | 46 ++++++++------
src/bin/pg_rewind/t/003_extrafiles.pl | 108 ++++++++++++++++++---------------
5 files changed, 159 insertions(+), 129 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2015-04-13 15:31:12 pgsql: Fix pg_rewind regression tests in VPATH builds
Previous Message Heikki Linnakangas 2015-04-13 14:56:54 pgsql: Don't archive bogus recycled or preallocated files after timelin