Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit67c0698

Browse files
committed
psql: Add test for handling of replication commands
Add a test for the clean handling of unsupported replication commandresponses. This was once accidentally broken, and it seems unusualenough that it's easy to forget when testing manually.Discussion:https://www.postgresql.org/message-id/2570e2ae-fa0f-aac9-f72f-bb59a9983a20@enterprisedb.com
1 parentc0280bc commit67c0698

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

‎src/bin/psql/t/001_basic.pl

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
use PostgresNode;
88
use TestLib;
9-
use Test::Moretests=>23;
9+
use Test::Moretests=>25;
1010

1111
program_help_ok('psql');
1212
program_version_ok('psql');
@@ -26,8 +26,19 @@
2626

2727
my$node = PostgresNode->new('main');
2828
$node->init;
29+
$node->append_conf(
30+
'postgresql.conf',q{
31+
wal_level = 'logical'
32+
max_replication_slots = 4
33+
max_wal_senders = 4
34+
});
2935
$node->start;
3036

3137
$node->command_like(['psql','-c','\copyright' ],qr/Copyright/,'\copyright');
3238
$node->command_like(['psql','-c','\help' ],qr/ALTER/,'\help without arguments');
3339
$node->command_like(['psql','-c','\help SELECT' ],qr/SELECT/,'\help');
40+
41+
42+
# Test clean handling of unsupported replication command responses
43+
$node->command_fails_like(['psql','replication=database','-c','START_REPLICATION 0/0' ],
44+
qr/^unexpected PQresultStatus: 8$/,'handling of unexpected PQresultStatus');

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp