Re: pg_rewind tests

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_rewind tests
Date: 2015-04-02 01:56:28
Message-ID: CAB7nPqTDp60X1rtSePhWogn6RB4+SCUScxMVxEJwTf4Zx80KGg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Mar 31, 2015 at 4:37 PM, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
wrote:

> While looking at that I noticed two additional issues:
> - In remote mode, the connection string to the promoted standby was
> incorrect when running pg_rewind, leading to connection errors
> - At least in my environment, a sleep of 1 after the standby promotion was
> not sufficient to make the tests work.
>

While working on another patch for TAP tests, I noticed that relying on
environment variables to run tests is a bad idea as well, as other tests do
not do it, so instead is a patch that refactors the tests so as they do not
use environment variables and so as it is not necessary to pass arguments
to prove.
The trick is to use sub-routines in each test, and invoke this subroutine
for both 'local' and 'remote'. This changes the order the tests are run,
but I guess that's not a big deal as long as the tests are run, and this
approach looks more solid to me as it makes pg_rewind's tests more
consistent with the rest. The log files of each test are still separated
the same way as before.
Regards,
--
Michael

Attachment Content-Type Size
0001-Refactor-TAP-tests-of-pg_rewind.patch text/x-patch 16.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2015-04-02 02:46:53 Re: POLA violation with \c service=
Previous Message Alvaro Herrera 2015-04-02 00:38:55 Re: POLA violation with \c service=