[Rt-commit] rt branch, 3.9-trunk, updated. rt-3.9.4-40-g04619ec
Shawn Moore
sartak at bestpractical.com
Thu Sep 30 18:39:20 EDT 2010
The branch, 3.9-trunk has been updated
via 04619ec46173759af3035d091fd0d072b962c2e6 (commit)
from f11ee435fe035efcf521bc7a68d1f7f20b5a3d22 (commit)
Summary of changes:
lib/RT/Test.pm | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
- Log -----------------------------------------------------------------
commit 04619ec46173759af3035d091fd0d072b962c2e6
Author: Shawn M Moore <sartak at bestpractical.com>
Date: Thu Sep 30 18:42:22 2010 -0400
Only add StashWarnings if we need it
diff --git a/lib/RT/Test.pm b/lib/RT/Test.pm
index 3d81bae..b71e782 100644
--- a/lib/RT/Test.pm
+++ b/lib/RT/Test.pm
@@ -1105,12 +1105,15 @@ sub start_standalone_server {
require RT::Interface::Web::Standalone;
- require Test::HTTP::Server::Simple::StashWarnings;
- unshift @RT::Interface::Web::Standalone::ISA,
- 'Test::HTTP::Server::Simple::StashWarnings';
- *RT::Interface::Web::Standalone::test_warning_path = sub {
- "/__test_warnings";
- };
+ # this may happen if we start two servers in the same test process
+ unless (RT::Interface::Web::Standalone->can('test_warning_path')) {
+ require Test::HTTP::Server::Simple::StashWarnings;
+ unshift @RT::Interface::Web::Standalone::ISA,
+ 'Test::HTTP::Server::Simple::StashWarnings';
+ *RT::Interface::Web::Standalone::test_warning_path = sub {
+ "/__test_warnings";
+ };
+ }
my $s = RT::Interface::Web::Standalone->new($port);
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list