Re: Removed unused import modules from tap tests

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: Removed unused import modules from tap tests
Дата
Msg-id d3bf4b30-b601-6401-2a96-f2048c5499fc@dunslane.net
обсуждение исходный текст
Ответ на Re: Removed unused import modules from tap tests  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 11/10/21 09:53, Tom Lane wrote:
> Daniel Gustafsson <daniel@yesql.se> writes:
>>> On 10 Nov 2021, at 13:37, Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
>>> ..but I wonder what's the *benefit* of removing those includes.  IOW, what's
>>> the reason not to simply drop the patch?
>> I think the value is mostly neatnikism, the actual effect on runtime is
>> unlikely to be measureable.  I won't argue against doing it, but I suspect
>> we'll just slowly add a lot of these back as tests evolve making excercise
>> less useful.
> Yeah, that last was pretty much my reaction.  I don't know enough about
> Perl to be sure how much an unused import costs, but I suspect you're
> right that it won't be measurable in context, considering that most of
> these test scripts run at least one initdb.
>
>             


:Cluster uses :Utils, and perl is smart enough not to try to reprocess
the module. Thus the extra cost here is almost certainly very close to zero.


This is a perfectly reasonable piece of boilerplate to use at the top of
a TAP test:


    use strict;

    use warnings;

    use PostgreSQL:Test::Cluster;

    use PostgreSQL::Test::Utils;

    use Test::More;


cheers


andrew


--
Andrew Dunstan
EDB: https://www.enterprisedb.com




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bharath Rupireddy
Дата:
Сообщение: Re: emit recovery stats via a new file or a new hook
Следующее
От: "Bossart, Nathan"
Дата:
Сообщение: Re: archive modules