Re: pgsql: psql: Add test for query canceling - Mailing list pgsql-committers

From Daniel Gustafsson
Subject Re: pgsql: psql: Add test for query canceling
Date
Msg-id 5F16EBAA-30D3-4C0D-840C-C2FF2739E370@yesql.se
Whole thread Raw
In response to Re: pgsql: psql: Add test for query canceling  (Fabien COELHO <coelho@cri.ensmp.fr>)
Responses Re: pgsql: psql: Add test for query canceling  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-committers
> On 20 Aug 2021, at 17:40, Fabien COELHO <coelho@cri.ensmp.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
ignorewhen 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/




pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Fix performance bug in regexp's citerdissect/creviterdissect.
Next
From: Tom Lane
Date:
Subject: Re: pgsql: psql: Add test for query canceling