Re: Too-short timeouts in test code

From: Noah Misch <noah(at)leadboat(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Too-short timeouts in test code
Date: 2018-12-09 02:24:35
Message-ID: 20181209022435.GE2973271@rfd.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Dec 09, 2018 at 11:14:12AM +0900, Michael Paquier wrote:
> On Sat, Dec 08, 2018 at 04:16:01PM -0800, Noah Misch wrote:
> > @@ -72,7 +72,7 @@ my $endpos = $node_master->safe_psql('postgres',
> > print "waiting to replay $endpos\n";
> >
> > my $stdout_recv = $node_master->pg_recvlogical_upto(
> > - 'postgres', 'test_slot', $endpos, 10,
> > + 'postgres', 'test_slot', $endpos, 180,
> > 'include-xids' => '0',
> > 'skip-empty-xacts' => '1');
>
> Instead of allowing callers of pg_recvlogical_upto() to define the
> timeout they want, perhaps it would be better to hardcode the timeout
> limit within the routine?

pg_recvlogical_upto() has the ability to make timeout non-fatal, by calling it
in an array context. No in-tree test uses that. Out-of-tree code using that
feature would likely benefit from the ability to set timeout duration. Hence,
I'm inclined not remove the timeout duration parameter.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2018-12-09 03:26:54 Re: Too-short timeouts in test code
Previous Message Michael Paquier 2018-12-09 02:14:12 Re: Too-short timeouts in test code