summaryrefslogtreecommitdiff
path: root/t/CP_Testing.pm
diff options
context:
space:
mode:
Diffstat (limited to 't/CP_Testing.pm')
-rw-r--r--t/CP_Testing.pm24
1 files changed, 14 insertions, 10 deletions
diff --git a/t/CP_Testing.pm b/t/CP_Testing.pm
index b4672287a..5638cb1d1 100644
--- a/t/CP_Testing.pm
+++ b/t/CP_Testing.pm
@@ -36,18 +36,22 @@ sub cleanup {
my $self = shift;
my $dbdir = $self->{dbdir} or die;
- my $pidfile = "$dbdir/data space/postmaster.pid";
- return if ! -e $pidfile;
- open my $fh, '<', $pidfile or die qq{Could not open "$pidfile": $!\n};
- <$fh> =~ /^(\d+)/ or die qq{File "$pidfile" did not start with a number!\n};
- my $pid = $1;
- close $fh or die qq{Could not close "$pidfile": $!\n};
- kill 15 => $pid;
- sleep 1;
- if (kill 0 => $pid) {
- kill 9 => $pid;
+ for my $dirnum ('', '2', '3', '4', '5') {
+ my $pidfile = "$dbdir$dirnum/data space/postmaster.pid";
+ next if ! -e $pidfile;
+ open my $fh, '<', $pidfile or die qq{Could not open "$pidfile": $!\n};
+ <$fh> =~ /^(\d+)/ or die qq{File "$pidfile" did not start with a number!\n};
+ my $pid = $1;
+ close $fh or die qq{Could not close "$pidfile": $!\n};
+ kill 15 => $pid;
+ sleep 1;
+ if (kill 0 => $pid) {
+ kill 9 => $pid;
+ }
}
+
return;
+
}
sub test_database_handle {