diff options
author | Alvaro Herrera | 2016-03-03 15:49:02 +0000 |
---|---|---|
committer | Alvaro Herrera | 2016-03-03 15:51:47 +0000 |
commit | 5bec1ad4648e71711357caa0ae0030f5ccb911d7 (patch) | |
tree | 3dea752b5b93c3b35e929fe42e99658ff881656c | |
parent | c7111d11b188bd631a63c98e9aab8532176007c3 (diff) |
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
-rw-r--r-- | src/test/recovery/t/003_recovery_targets.pl | 2 | ||||
-rw-r--r-- | src/test/recovery/t/004_timeline_switch.pl | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/test/recovery/t/003_recovery_targets.pl b/src/test/recovery/t/003_recovery_targets.pl index 8b581cc8179..bae0ce5db28 100644 --- a/src/test/recovery/t/003_recovery_targets.pl +++ b/src/test/recovery/t/003_recovery_targets.pl @@ -84,7 +84,7 @@ my $recovery_name = "my_target"; my $lsn4 = $node_master->psql('postgres', "SELECT pg_current_xlog_location();"); $node_master->psql('postgres', - "SELECT pg_create_restore_point('$recovery_name'"); + "SELECT pg_create_restore_point('$recovery_name');"); # Force archiving of WAL file $node_master->psql('postgres', "SELECT pg_switch_xlog()"); diff --git a/src/test/recovery/t/004_timeline_switch.pl b/src/test/recovery/t/004_timeline_switch.pl index 58bf5803e4c..8a95432df26 100644 --- a/src/test/recovery/t/004_timeline_switch.pl +++ b/src/test/recovery/t/004_timeline_switch.pl @@ -3,7 +3,7 @@ # on a new timeline. use strict; use warnings; -use File::Path qw(remove_tree); +use File::Path qw(rmtree); use PostgresNode; use TestLib; use Test::More tests => 1; @@ -46,7 +46,7 @@ $node_master->teardown_node; $node_standby_1->promote; # Switch standby 2 to replay from standby 1 -remove_tree($node_standby_2->data_dir . '/recovery.conf'); +rmtree($node_standby_2->data_dir . '/recovery.conf'); my $connstr_1 = $node_standby_1->connstr; $node_standby_2->append_conf( 'recovery.conf', qq( |