summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Eisentraut2017-05-01 16:11:25 +0000
committerPeter Eisentraut2017-07-05 17:37:08 +0000
commit6deb52b202e0f673b583b03ad141ccad6f8e7fba (patch)
tree67eb1311b9cf67ecd97234309f62fa81263312b4
parent1bac5f552a25aca3aa2ef1d404f7cdf7788c34d8 (diff)
Remove unnecessary pg_is_in_recovery calls in tests
Since pg_ctl promote already waits for recovery to end, these calls are obsolete.
-rw-r--r--src/test/modules/commit_ts/t/003_standby_2.pl2
-rw-r--r--src/test/recovery/t/008_fsm_truncation.pl2
-rw-r--r--src/test/recovery/t/009_twophase.pl6
-rw-r--r--src/test/recovery/t/010_logical_decoding_timelines.pl4
-rw-r--r--src/test/recovery/t/012_subtransactions.pl6
5 files changed, 0 insertions, 20 deletions
diff --git a/src/test/modules/commit_ts/t/003_standby_2.pl b/src/test/modules/commit_ts/t/003_standby_2.pl
index eccaf07561..c3000f5b4c 100644
--- a/src/test/modules/commit_ts/t/003_standby_2.pl
+++ b/src/test/modules/commit_ts/t/003_standby_2.pl
@@ -55,8 +55,6 @@ $master->append_conf('postgresql.conf', 'track_commit_timestamp = off');
$master->restart;
system_or_bail('pg_ctl', '-D', $standby->data_dir, 'promote');
-$standby->poll_query_until('postgres', "SELECT NOT pg_is_in_recovery()")
- or die "standby never exited recovery";
$standby->safe_psql('postgres', "create table t11()");
my $standby_ts = $standby->safe_psql('postgres',
diff --git a/src/test/recovery/t/008_fsm_truncation.pl b/src/test/recovery/t/008_fsm_truncation.pl
index 56eecf722c..ddab464a97 100644
--- a/src/test/recovery/t/008_fsm_truncation.pl
+++ b/src/test/recovery/t/008_fsm_truncation.pl
@@ -83,8 +83,6 @@ $node_standby->poll_query_until('postgres', $caughtup_query)
# Promote the standby
$node_standby->promote;
-$node_standby->poll_query_until('postgres', "SELECT NOT pg_is_in_recovery()")
- or die "Timed out while waiting for promotion of standby";
$node_standby->psql('postgres', 'checkpoint');
# Restart to discard in-memory copy of FSM
diff --git a/src/test/recovery/t/009_twophase.pl b/src/test/recovery/t/009_twophase.pl
index 2922c763b3..d5bcd25fed 100644
--- a/src/test/recovery/t/009_twophase.pl
+++ b/src/test/recovery/t/009_twophase.pl
@@ -215,8 +215,6 @@ $cur_master->psql(
PREPARE TRANSACTION 'xact_009_10';");
$cur_master->teardown_node;
$cur_slave->promote;
-$cur_slave->poll_query_until('postgres', "SELECT NOT pg_is_in_recovery()")
- or die "Timed out while waiting for promotion of standby " . $cur_slave->name;
# change roles
note "Now paris is master and london is slave";
@@ -254,8 +252,6 @@ $cur_master->psql(
$cur_master->stop;
$cur_slave->restart;
$cur_slave->promote;
-$cur_slave->poll_query_until('postgres', "SELECT NOT pg_is_in_recovery()")
- or die "Timed out while waiting for promotion of standby " . $cur_slave->name;
# change roles
note "Now london is master and paris is slave";
@@ -296,8 +292,6 @@ $cur_master->stop;
$cur_slave->teardown_node;
$cur_slave->start;
$cur_slave->promote;
-$cur_slave->poll_query_until('postgres', "SELECT NOT pg_is_in_recovery()")
- or die "Timed out while waiting for promotion of standby " . $cur_slave->name;
# change roles
note "Now paris is master and london is slave";
diff --git a/src/test/recovery/t/010_logical_decoding_timelines.pl b/src/test/recovery/t/010_logical_decoding_timelines.pl
index ed9e4997c4..d4259808dd 100644
--- a/src/test/recovery/t/010_logical_decoding_timelines.pl
+++ b/src/test/recovery/t/010_logical_decoding_timelines.pl
@@ -137,10 +137,6 @@ $node_master->safe_psql('postgres', 'CHECKPOINT');
$node_master->stop('immediate');
$node_replica->promote;
-print "waiting for replica to come up\n";
-$node_replica->poll_query_until('postgres',
- "SELECT NOT pg_is_in_recovery();")
- or die "replica never exited recovery";
$node_replica->safe_psql('postgres',
"INSERT INTO decoding(blah) VALUES ('after failover');");
diff --git a/src/test/recovery/t/012_subtransactions.pl b/src/test/recovery/t/012_subtransactions.pl
index 30677e1675..c99733cad7 100644
--- a/src/test/recovery/t/012_subtransactions.pl
+++ b/src/test/recovery/t/012_subtransactions.pl
@@ -109,8 +109,6 @@ $node_slave->psql(
is($psql_out, '8128', "Visible");
$node_master->stop;
$node_slave->promote;
-$node_slave->poll_query_until('postgres', "SELECT NOT pg_is_in_recovery()")
- or die "Timed out while waiting for promotion of standby";
$node_slave->psql(
'postgres',
@@ -162,8 +160,6 @@ $node_slave->psql(
is($psql_out, '-1', "Not visible");
$node_master->stop;
$node_slave->promote;
-$node_slave->poll_query_until('postgres', "SELECT NOT pg_is_in_recovery()")
- or die "Timed out while waiting for promotion of standby";
$node_slave->psql(
'postgres',
@@ -205,8 +201,6 @@ $node_slave->psql(
is($psql_out, '-1', "Not visible");
$node_master->stop;
$node_slave->promote;
-$node_slave->poll_query_until('postgres', "SELECT NOT pg_is_in_recovery()")
- or die "Timed out while waiting for promotion of standby";
$node_slave->psql(
'postgres',