Re: Replacing TAP test planning with done_testing()

From: Julien Rouhaud <rjuju123(at)gmail(dot)com>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Replacing TAP test planning with done_testing()
Date: 2022-02-09 14:16:11
Message-ID: 20220209141611.exsdwbt5ebwn2t37@jrouhaud
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Wed, Feb 09, 2022 at 03:01:36PM +0100, Daniel Gustafsson wrote:
> Whether or not to explicitly plan the number of TAP tests per suite has been
> discussed a number of times on this list, often as a side-note in an unrelated
> thread which adds/modifies a test. The concensus has so far weighed towards
> not doing manual bookkeeping of test plans but to let Test::More deal with it.
> So far, no concrete patch to make that happen has been presented though.
>
> The attached patch removes all Test::More planning and instead ensures that all
> tests conclude with a done_testing() call. While there, I also removed a few
> exit(0) calls from individual tests making them more consistent.
>
> Thoughts?

+1, I don't think it adds much value compared to the extra work it requires.
Not having the current total also doesn't seem much a problem, as it was said
on the other thread no tests is long enough to really care, at least on a
development box.

I still remember the last time I wanted to add some TAP tests to pg_dump, and
it wasn't pleasant. In any case we should at least get rid of this one.

The patch itself looks good to me.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2022-02-09 14:18:57 Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints
Previous Message Daniel Gustafsson 2022-02-09 14:14:30 Re: Add tag/category to the commitfest app