[Rt-commit] r15389 - in rt/3.8/trunk: .
ruz at bestpractical.com
ruz at bestpractical.com
Fri Aug 22 20:21:03 EDT 2008
Author: ruz
Date: Fri Aug 22 20:21:02 2008
New Revision: 15389
Modified:
rt/3.8/trunk/ (props changed)
rt/3.8/trunk/lib/RT/Test.pm
Log:
r15300 at cubic-pc (orig r15248): cubic | 2008-08-20 01:18:43 +0400
* wait for children before dropping DB as those may have
connections to the DB
Modified: rt/3.8/trunk/lib/RT/Test.pm
==============================================================================
--- rt/3.8/trunk/lib/RT/Test.pm (original)
+++ rt/3.8/trunk/lib/RT/Test.pm Fri Aug 22 20:21:02 2008
@@ -236,6 +236,7 @@
DBIx::SearchBuilder::Record::Cachable->FlushCache;
}
+my @SERVERS;
sub started_ok {
require RT::Test::Web;
if ( $existing_server ) {
@@ -246,6 +247,7 @@
my $s = RT::Interface::Web::Standalone->new($port);
push @server, $s;
my $ret = $s->started_ok;
+ @SERVERS = $s->pids;
$RT::Handle = new RT::Handle;
$RT::Handle->dbh( undef );
RT->ConnectToDatabase;
@@ -792,6 +794,12 @@
my $Test = RT::Test->builder;
return if $Test->{Original_Pid} != $$;
if ( $ENV{RT_TEST_PARALLEL} && $created_new_db ) {
+ {
+ kill 'INT', @SERVERS;
+ foreach my $pid (@SERVERS) {
+ waitpid $pid, 0;
+ }
+ }
# Pg doesn't like if you issue a DROP DATABASE while still connected
my $dbh = $RT::Handle->dbh;
More information about the Rt-commit
mailing list