Re: In-core regression tests for replication, cascading, archiving, PITR, etc.

Michael Paquier <michael.paquier@gmail.com>

From: Michael Paquier <michael.paquier@gmail.com>
To: Amir Rohan <amir.rohan@zoho.com>
Cc: Amir Rohan <amir.rohan@mail.com>, Noah Misch <noah@leadboat.com>, Andres Freund <andres@2ndquadrant.com>, PostgreSQL mailing lists <pgsql-hackers@postgresql.org>, gsmith@gregsmith.com
Date: 2015-10-04T11:03:32Z
Lists: pgsql-hackers

Attachments

On Sat, Oct 3, 2015 at 10:47 PM, Michael Paquier wrote:
> On Sat, Oct 3, 2015 at 9:50 PM, Amir Rohan wrote:
>>>> Block until recovery is finished, before testing. eliminate races, and
>>>> avoid the stupid sleep(3) I used.
>>>
>>> TODO
>
> Well. I just recalled this item in the list of things you mentioned. I
> marked it but forgot to address it. It sounds right that we may want
> something using pg_isready in a loop as a node in recovery would
> reject connections.

I just hacked up an updated version with the following things:
- Optional argument for stop_node to define the stop mode of pg_ctl
- Addition of wait_for_node where pg_isready is used to wait until a
node is ready to accept queries
- Addition of a local lookup variable to track the last port assigned.
This accelerates get_free_port.
Regards,
-- 
Michael

Commits

  1. Add a test framework for recovery

  2. Refactor Perl test code

  3. pgindent run for 9.5