[Rt-commit] r7365 - rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT

clkao at bestpractical.com clkao at bestpractical.com
Tue Mar 27 08:23:37 EDT 2007


Author: clkao
Date: Tue Mar 27 08:23:37 2007
New Revision: 7365

Modified:
   rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/Test.pm

Log:
Reconnect to database after starting test server, as it's a forked
standalone server and we don't want to use the same dbi handle.


Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/Test.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/Test.pm	(original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/lib/RT/Test.pm	Tue Mar 27 08:23:37 2007
@@ -82,7 +82,11 @@
 sub started_ok {
     my $s = RT::Interface::Web::Standalone->new($port);
     push @server, $s;
-    return ($s->started_ok, Test::WWW::Mechanize->new);
+    my $ret = $s->started_ok;
+    $RT::Handle = new RT::Handle;
+    $RT::Handle->dbh( undef );
+    RT->ConnectToDatabase;
+    return ($ret, Test::WWW::Mechanize->new);
 }
 
 sub _get_dbh {


More information about the Rt-commit mailing list