Re: TAP test for recovery_end_command

2021-10-28 Thread Michael Paquier
On Thu, Oct 28, 2021 at 09:25:43AM +0530, Amul Sul wrote: > Thanks a lot, Michael. So.. The buildfarm members running on Windows and running the recovery tests are jacana (MinGW) and fairywren (Msys), both reporting green. drongo (MSVC) skips those tests, but I have tested MSVC by myself so I th

Re: TAP test for recovery_end_command

2021-10-27 Thread Amul Sul
On Thu, Oct 28, 2021 at 7:24 AM Michael Paquier wrote: > > On Wed, Oct 27, 2021 at 02:20:50PM +0900, Michael Paquier wrote: > > ok(!-f $recovery_end_command_file, > > - 'recovery_end_command executed after promotion'); > > + 'recovery_end_command not executed yet'); > > Indeed :p > > While lo

Re: TAP test for recovery_end_command

2021-10-27 Thread Michael Paquier
On Wed, Oct 27, 2021 at 02:20:50PM +0900, Michael Paquier wrote: > ok(!-f $recovery_end_command_file, > - 'recovery_end_command executed after promotion'); > + 'recovery_end_command not executed yet'); > Indeed :p While looking at that this morning, I have noticed an extra bug. If the path o

Re: TAP test for recovery_end_command

2021-10-26 Thread Michael Paquier
On Wed, Oct 27, 2021 at 10:32:22AM +0530, Amul Sul wrote: > Thanks for the updated version. The patch is much better than before > except needing minor changes to the test description that testing > recovery_end_command_file before promotion, I did the same in the > attached version. ok(!-f $reco

Re: TAP test for recovery_end_command

2021-10-26 Thread Amul Sul
On Wed, Oct 27, 2021 at 9:37 AM Michael Paquier wrote: > > On Mon, Oct 25, 2021 at 02:42:28PM +0530, Amul Sul wrote: > > Understood, moved tests to 002_archiving.pl in the attached version. > > Thanks for the new patch. I have reviewed its contents, and there > were a couple of things that caught

Re: TAP test for recovery_end_command

2021-10-26 Thread Michael Paquier
On Mon, Oct 25, 2021 at 02:42:28PM +0530, Amul Sul wrote: > Understood, moved tests to 002_archiving.pl in the attached version. Thanks for the new patch. I have reviewed its contents, and there were a couple of things that caught my attention while putting my hands on it. +$node_standby->append

Re: TAP test for recovery_end_command

2021-10-25 Thread Amul Sul
On Wed, Oct 20, 2021 at 11:09 AM Michael Paquier wrote: > > On Wed, Oct 06, 2021 at 06:49:10PM +0530, Amul Sul wrote: > > Thanks for the suggestion, added the same in the attached version. > > Hmm. The run-time of 020_archive_status.p bumps from 4.7s to 5.8s on > my laptop, so the change is notic

Re: TAP test for recovery_end_command

2021-10-19 Thread Michael Paquier
On Wed, Oct 06, 2021 at 06:49:10PM +0530, Amul Sul wrote: > Thanks for the suggestion, added the same in the attached version. Hmm. The run-time of 020_archive_status.p bumps from 4.7s to 5.8s on my laptop, so the change is noticeable. I agree that it would be good to have more coverage for thos

Re: TAP test for recovery_end_command

2021-10-06 Thread Amul Sul
On Wed, Oct 6, 2021 at 1:40 AM Andres Freund wrote: > > Hi, > > On 2021-09-14 10:34:09 +0530, Amul Sul wrote: > > +# recovery_end_command_file executed only on recovery end which can happen > > on > > +# promotion. > > +$standby3->promote; > > +ok(-f "$recovery_end_command_file", > > + 'recov

Re: TAP test for recovery_end_command

2021-10-05 Thread Andres Freund
Hi, On 2021-09-14 10:34:09 +0530, Amul Sul wrote: > +# recovery_end_command_file executed only on recovery end which can happen on > +# promotion. > +$standby3->promote; > +ok(-f "$recovery_end_command_file", > + 'recovery_end_command executed after promotion'); It'd be good to test what happ

Re: TAP test for recovery_end_command

2021-09-13 Thread Amul Sul
On Mon, Sep 13, 2021 at 8:39 PM Euler Taveira wrote: > > On Mon, Sep 13, 2021, at 10:09 AM, Amul Sul wrote: > > Yeah, added that test too. I triggered the restartpoint via a > CHECKPOINT command in the attached version. > > +# archive_cleanup_command executed with every restart points > +ok( !-f "

Re: TAP test for recovery_end_command

2021-09-13 Thread Euler Taveira
On Mon, Sep 13, 2021, at 10:09 AM, Amul Sul wrote: > Yeah, added that test too. I triggered the restartpoint via a > CHECKPOINT command in the attached version. +# archive_cleanup_command executed with every restart points +ok( !-f "$archive_cleanup_command_file", + 'archive_cleanup_command not exe

Re: TAP test for recovery_end_command

2021-09-13 Thread Amul Sul
On Mon, Sep 13, 2021 at 5:56 AM Euler Taveira wrote: > > On Thu, Sep 9, 2021, at 8:18 AM, Amul Sul wrote: > > The attached patch adds a small test for recovery_end_command execution. > > Additional coverage is always a good thing. > Thanks for the confirmation. > Currently, patch tests execution

Re: TAP test for recovery_end_command

2021-09-12 Thread Amul Sul
On Mon, Sep 13, 2021 at 8:44 AM Michael Paquier wrote: > > On Sun, Sep 12, 2021 at 09:25:32PM -0300, Euler Taveira wrote: > > On Thu, Sep 9, 2021, at 8:18 AM, Amul Sul wrote: > >> Also, we don't have a good test for archive_cleanup_command as well, I > >> am not sure how we could test that which e

Re: TAP test for recovery_end_command

2021-09-12 Thread Michael Paquier
On Sun, Sep 12, 2021 at 09:25:32PM -0300, Euler Taveira wrote: > On Thu, Sep 9, 2021, at 8:18 AM, Amul Sul wrote: >> Also, we don't have a good test for archive_cleanup_command as well, I >> am not sure how we could test that which executes with every >> restart-point. > > Setup a replica and stop

Re: TAP test for recovery_end_command

2021-09-12 Thread Euler Taveira
On Thu, Sep 9, 2021, at 8:18 AM, Amul Sul wrote: > The attached patch adds a small test for recovery_end_command execution. Additional coverage is always a good thing. > Currently, patch tests execution of recovery_end_command by creating > dummy file, I am not wedded only to this approach, other