Re: pgsql: psql: Add test for query canceling

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: psql: Add test for query canceling
Date: 2021-08-20 18:27:32
Message-ID: 5F16EBAA-30D3-4C0D-840C-C2FF2739E370@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

> On 20 Aug 2021, at 17:40, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> wrote:
>
>
>>> psql: Add test for query canceling
>>
>> Seems sidewinder didn’t quite like this:
>
>> Nothing obvious sticks out, could it be timing related?
>
> Hmmm. Possibly, as the test is time dependent, hence the "SKIP:" section, which should mean that the test should be ignore when it fails. It seems that this part did not work. Maybe it should not state that it is expecting 2 results?
>
> use Test::More tests => 2;
>
> Replace by:
>
> use Test::More;
>
> Or something is amiss with the "SKIP" section trick?

SKIP blocks only skip tests if the condition is met, in the test as it stands
now it skips it on Windows since it requires a Unix shell:

+SKIP: {
+ skip "cancel test requires a Unix shell", 2 if $windows_os;

On all other platforms the test will execute and count towards the overall test
result of the suite.

If we want the test to run but not fail the entire test suite if it fails then
it should use a TODO block instead, but that’s intended for tests known to fail
and this doesn’t seem to fall in that category.

--
Daniel Gustafsson https://vmware.com/

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2021-08-20 18:47:58 Re: pgsql: psql: Add test for query canceling
Previous Message Tom Lane 2021-08-20 18:19:24 pgsql: Fix performance bug in regexp's citerdissect/creviterdissect.