Skip to content

Commit 5bec1ad

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

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::Path qw(remove_tree);
6+
use File::Path qw(rmtree);
77
use PostgresNode;
88
use TestLib;
99
use Test::More tests => 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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy