From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | Mark Dilger <markdilger(at)yahoo(dot)com> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: In-core regression tests for replication, cascading, archiving, PITR, etc. Michael Paquier |
Date: | 2014-01-09 06:02:32 |
Message-ID: | CAB7nPqSm7SpxbM88fyHnE03T59nc+04XYKfXbkXAwh3tcViEcg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Jan 9, 2014 at 12:34 PM, Mark Dilger <markdilger(at)yahoo(dot)com> wrote:
> Michael Paquier wrote:
>> A possible input for a test that users could provide would be something>
>> like that:
>>
>> # Node information for tests
>> nodes> {
>> {node1, postgresql.conf params, recovery.conf params}
>> {node2, postgresql.conf params, recovery.conf params, slave of node1}
>> }
>> # Run test
>> init node1
>> run_sql node1 file1.sql
>> # Check output
>> init node2
>> run_sql node2 file2.sql
>> # Check that results are fine
>> # Process
>>
>> The main problem is actually how to do that. Having some smart shell
>> infrastructure would be simple and would facilitate (?) the maintenance
>> of code used to run the tests. On the contrary having a C program would
>> make the maintenance of code to run the tests more difficult (?) for a
>> trade with more readable test suite input like the one I wrote above.
>> This might also make the test input more readable for a human eye, in
>> the shape of what is already available in src/test/isolation.
>
> I like making this part of src/test/isolation, if folks do not object.
> The core infrastructure in src/test/isolation seems applicable to
> replication testing, and I'd hate to duplicate that code.
>
> As for the node setup in your example above, I don't think it can be as
> simple as defining nodes first, then running tests. The configurations
> themselves may need to be changed during the execution of a test, and
> services stopped and started, all under test control and specified in
> the same easy format.
Yes, my example was very basic :). What you actually need is the
possibility to perform actions on nodes during a test run, basically:
stop, start, init, reload, run SQL, change params/create new conf
files (like putting a node in recovery could be = create recovery.conf
+ restart). The place of the code does not matter much, but don't
think that it should be part of isolation as clustering and isolation
are too different test suites. I would have for example seen that as
src/test/cluster, with src/test/common for things that are shared
between test infrastructures.
As mentioned by Steve, the test suite of Slony might be interesting to
look at to get some ideas.
Regards,
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Dean Rasheed | 2014-01-09 10:48:34 | Re: WIP patch (v2) for updatable security barrier views |
Previous Message | Andreas Karlsson | 2014-01-09 04:48:42 | Re: Planning time in explain/explain analyze |