Author: turnstep
Date: Thu May  1 08:37:15 2008
New Revision: 11168

Modified:
   DBD-Pg/trunk/t/dbdpg_test_setup.pl

Log:
Smarter cleanup of test db


Modified: DBD-Pg/trunk/t/dbdpg_test_setup.pl
==============================================================================
--- DBD-Pg/trunk/t/dbdpg_test_setup.pl  (original)
+++ DBD-Pg/trunk/t/dbdpg_test_setup.pl  Thu May  1 08:37:15 2008
@@ -496,9 +496,9 @@
 
 sub shutdown_test_database {
 
-       if (-e $test_database_dir) {
+       if (-e $test_database_dir and -e "$test_database_dir/postmaster.pid") {
                eval {
-                       qx{pg_ctl -D $test_database_dir -m fast stop};
+                       qx{pg_ctl -D $test_database_dir -m fast stop 2>&1};
                };
                return $@;
        }

Reply via email to