summaryrefslogtreecommitdiff
path: root/src/bin/pg_rewind/RewindTest.pm
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2018-05-27 09:08:42 -0400
committerAndrew Dunstan <andrew@dunslane.net>2018-05-27 09:08:42 -0400
commit3a7cc727c7c502353dbb730a0db793abec4de44b (patch)
treec140b2974559d0a13d98c132ae52f7d0992aff95 /src/bin/pg_rewind/RewindTest.pm
parent8a56ff484808e9c05df9656cf4244229e8c7960d (diff)
Don't fall off the end of perl functions
This complies with the perlcritic policy Subroutines::RequireFinalReturn, which is a severity 4 policy. Since we only currently check at severity level 5, the policy is raised to that level until we move to level 4 or lower, so that any new infringements will be caught. A small cosmetic piece of tidying of the pgperlcritic script is included. Mike Blackwell Discussion: https://postgr.es/m/CAESHdJpfFm_9wQnQ3koY3c91FoRQsO-fh02za9R3OEMndOn84A@mail.gmail.com
Diffstat (limited to 'src/bin/pg_rewind/RewindTest.pm')
-rw-r--r--src/bin/pg_rewind/RewindTest.pm13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/bin/pg_rewind/RewindTest.pm b/src/bin/pg_rewind/RewindTest.pm
index 52531bba7a3..60b54119e7a 100644
--- a/src/bin/pg_rewind/RewindTest.pm
+++ b/src/bin/pg_rewind/RewindTest.pm
@@ -71,6 +71,7 @@ sub master_psql
system_or_bail 'psql', '-q', '--no-psqlrc', '-d',
$node_master->connstr('postgres'), '-c', "$cmd";
+ return;
}
sub standby_psql
@@ -79,6 +80,7 @@ sub standby_psql
system_or_bail 'psql', '-q', '--no-psqlrc', '-d',
$node_standby->connstr('postgres'), '-c', "$cmd";
+ return;
}
# Run a query against the master, and check that the output matches what's
@@ -112,6 +114,7 @@ sub check_query
$stdout =~ s/\r//g if $Config{osname} eq 'msys';
is($stdout, $expected_stdout, "$test_name: query result matches");
}
+ return;
}
sub setup_cluster
@@ -130,6 +133,7 @@ sub setup_cluster
'postgresql.conf', qq(
wal_keep_segments = 20
));
+ return;
}
sub start_master
@@ -138,6 +142,8 @@ sub start_master
#### Now run the test-specific parts to initialize the master before setting
# up standby
+
+ return;
}
sub create_standby
@@ -162,6 +168,8 @@ recovery_target_timeline='latest'
# The standby may have WAL to apply before it matches the primary. That
# is fine, because no test examines the standby before promotion.
+
+ return;
}
sub promote_standby
@@ -183,6 +191,8 @@ sub promote_standby
# after promotion so quickly that when pg_rewind runs, the standby has not
# performed a checkpoint after promotion yet.
standby_psql("checkpoint");
+
+ return;
}
sub run_pg_rewind
@@ -266,6 +276,8 @@ recovery_target_timeline='latest'
$node_master->start;
#### Now run the test-specific parts to check the result
+
+ return;
}
# Clean up after the test. Stop both servers, if they're still running.
@@ -273,6 +285,7 @@ sub clean_rewind_test
{
$node_master->teardown_node if defined $node_master;
$node_standby->teardown_node if defined $node_standby;
+ return;
}
1;