From: | Daniel Gustafsson <daniel(at)yesql(dot)se> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: IPC::Run::time[r|out] vs our TAP tests |
Date: | 2025-02-20 14:09:58 |
Message-ID: | 73CC6454-E4DE-40D3-94FD-ECEBCE9236C6@yesql.se |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> On 20 Feb 2025, at 14:06, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
> Actually, since ok() and friends return true iff the test succeeds, instead of
> + ok(! $self->{timeout}->is_expired, 'psql query_until did not time out');
> + return undef if $self->{timeout}->is_expired;
> you can avoid doing the same test twice and say:
> ok(! $self->{timeout}->is_expired, 'psql query_until did not time out') || return undef;
> although for slightly technical reasons perlcritic disapproves of "return undef" and prefers that you just write a bare "return" so we should also fix that.
> Sorry for taking a second bite at the cherry.
Not at all, I agree that this is an improvement so fixed in the attached along
with a fresh pgperltidy.
--
Daniel Gustafsson
Attachment | Content-Type | Size |
---|---|---|
v4-0002-Report-test-failure-rather-than-aborting-in-case-.patch | application/octet-stream | 4.2 KB |
v4-0001-Configure-interactive-instance-to-restart-timer.patch | application/octet-stream | 1.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Mihail Nikalayeu | 2025-02-20 14:56:20 | Re: Revisiting {CREATE INDEX, REINDEX} CONCURRENTLY improvements |
Previous Message | Mahendra Singh Thalor | 2025-02-20 13:49:27 | Re: Non-text mode for pg_dumpall |