mirror of
https://github.com/postgres/postgres.git
synced 2025-05-06 19:59:18 +03:00
Skip psql's TAP test for query cancellation entirely on Windows
This changes 020_cancel.pl so as the test is entirely skipped on Windows. This test was already doing nothing under WIN32, except initializing and starting a node without using it so this shaves a few test cycles. Author: Yugo NAGATA Reviewed-by: Fabien Coelho Discussion: https://postgr.es/m/20230810125935.22c2922ea5250ba79358965b@sraoss.co.jp Backpatch-through: 15
This commit is contained in:
parent
c7256e6564
commit
75b4f930d5
@ -9,21 +9,22 @@ use PostgreSQL::Test::Utils;
|
||||
use Test::More;
|
||||
use Time::HiRes qw(usleep);
|
||||
|
||||
my $tempdir = PostgreSQL::Test::Utils::tempdir;
|
||||
|
||||
my $node = PostgreSQL::Test::Cluster->new('main');
|
||||
$node->init;
|
||||
$node->start;
|
||||
|
||||
# Test query canceling by sending SIGINT to a running psql
|
||||
#
|
||||
# There is, as of this writing, no documented way to get the PID of
|
||||
# the process from IPC::Run. As a workaround, we have psql print its
|
||||
# own PID (which is the parent of the shell launched by psql) to a
|
||||
# file.
|
||||
SKIP:
|
||||
if ($windows_os)
|
||||
{
|
||||
skip "cancel test requires a Unix shell", 2 if $windows_os;
|
||||
plan skip_all => "cancel test requires a Unix shell";
|
||||
}
|
||||
|
||||
my $tempdir = PostgreSQL::Test::Utils::tempdir;
|
||||
|
||||
my $node = PostgreSQL::Test::Cluster->new('main');
|
||||
$node->init;
|
||||
$node->start;
|
||||
|
||||
local %ENV = $node->_get_env();
|
||||
|
||||
@ -75,6 +76,5 @@ SKIP:
|
||||
$stderr,
|
||||
qr/canceling statement due to user request/,
|
||||
'query was canceled');
|
||||
}
|
||||
|
||||
done_testing();
|
||||
|
Loading…
x
Reference in New Issue
Block a user