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

Commit5bec1ad

Browse files
committed
Fix mistakes in recovery tests
One test was relying on method remove_tree that isn't implemented in theoldest Perl we support; fix it by using the older rmtree instead.Another test had a typo in a SQL command, which isn't noticed becausethe PostgresNode->psql() method doesn't check that queries returncorrectly. That's undesirable and will also be fixed later on, but fornow let's make the test actually work.Author: Craig Ringer
1 parentc7111d1 commit5bec1ad

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

‎src/test/recovery/t/003_recovery_targets.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ sub test_recovery_standby
8484
my$lsn4 =
8585
$node_master->psql('postgres',"SELECT pg_current_xlog_location();");
8686
$node_master->psql('postgres',
87-
"SELECT pg_create_restore_point('$recovery_name'");
87+
"SELECT pg_create_restore_point('$recovery_name');");
8888

8989
# Force archiving of WAL file
9090
$node_master->psql('postgres',"SELECT pg_switch_xlog()");

‎src/test/recovery/t/004_timeline_switch.pl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# on a new timeline.
44
use strict;
55
use warnings;
6-
use File::Pathqw(remove_tree);
6+
use File::Pathqw(rmtree);
77
use PostgresNode;
88
use TestLib;
99
use Test::Moretests=> 1;
@@ -46,7 +46,7 @@
4646
$node_standby_1->promote;
4747

4848
# Switch standby 2 to replay from standby 1
49-
remove_tree($node_standby_2->data_dir .'/recovery.conf');
49+
rmtree($node_standby_2->data_dir .'/recovery.conf');
5050
my$connstr_1 =$node_standby_1->connstr;
5151
$node_standby_2->append_conf(
5252
'recovery.conf',qq(

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp