Don't start bucardo when no syncs while testing.
authorDavid E. Wheeler <david@justatheory.com>
Sat, 20 Oct 2012 00:11:45 +0000 (17:11 -0700)
committerDavid E. Wheeler <david@justatheory.com>
Sat, 20 Oct 2012 00:11:45 +0000 (17:11 -0700)
This seems to prevent an error where Bucardo won't start, even though it
waited. I suspect this is becaust earlier tests run that start Bucardo with no
syncs and don't bother to stop it again, because they expect it to exit, as it
did prior to cc92a976e00df6a5182745b47793b44401e6b336.

Also, don't shut down Postgres on test exit. It just seems to confuse things.

t/BucardoTesting.pm

index bc85baf4b3aa872fa8835e30dcfbc3ec6475715a..b09424667dcc2bff8500d5c445096ee4e43462b5 100644 (file)
@@ -966,13 +966,14 @@ sub restart_bucardo {
     $dbh->do('LISTEN bucardo_nosyncs');
     $dbh->commit();
 
-    $self->ctl('start testing');
+    my $output = $self->ctl('start --exit-on-nosync testing');
 
     my $bail = 30;
     my $n;
   WAITFORIT: {
         if ($bail--<0) {
-            die "Bucardo did not start, but we waited!\n";
+            $output =~ s/^/#     /gmx;
+            die "Bucardo did not start, but we waited! Start output:\n\n$output\n";
         }
         while ($n = $dbh->func('pg_notifies')) {
             my ($name, $pid, $payload) = @$n;
@@ -1261,7 +1262,7 @@ sub empty_test_database {
 } ## end of empty_test_database
 
 END {
-    __PACKAGE__->shutdown_cluster($_) for keys %pgver;
+#    __PACKAGE__->shutdown_cluster($_) for keys %pgver;
 }
 
 sub shutdown_cluster {