[Rt-commit] rt branch, 3.9-trunk, updated. rt-3.9.7-810-g1aa8e01
? sunnavy
sunnavy at bestpractical.com
Mon Dec 13 06:27:48 EST 2010
The branch, 3.9-trunk has been updated
via 1aa8e01413c4fdd59fd26c193f5755ae020871ac (commit)
via 43ed7e06b2565bc8080213bc6b8e6665c4c5c673 (commit)
via 48446f767f13ec5b62a4d2dea94c778c50a2002d (commit)
via de416300baf56f4587e135f739aa7356d3953d47 (commit)
from f1d72a041aac49db9fa02a30fe8dc51efc8d36a9 (commit)
Summary of changes:
lib/RT/Test/Web.pm | 29 -----------------------------
sbin/rt-server.in | 12 ++++++++++++
t/data/configs/apache2.2+mod_perl.conf.in | 18 ++++++++++++++++++
t/web/query_log.t | 4 ----
4 files changed, 30 insertions(+), 33 deletions(-)
- Log -----------------------------------------------------------------
commit de416300baf56f4587e135f739aa7356d3953d47
Author: sunnavy <sunnavy at bestpractical.com>
Date: Mon Dec 13 18:28:41 2010 +0800
limit to single process/thread for apache+mod_perl test
diff --git a/t/data/configs/apache2.2+mod_perl.conf.in b/t/data/configs/apache2.2+mod_perl.conf.in
index aca6f1b..a448473 100644
--- a/t/data/configs/apache2.2+mod_perl.conf.in
+++ b/t/data/configs/apache2.2+mod_perl.conf.in
@@ -1,3 +1,21 @@
+<IfModule mpm_prefork_module>
+ StartServers 1
+ MinSpareServers 1
+ MaxSpareServers 1
+ MaxClients 1
+ MaxRequestsPerChild 0
+</IfModule>
+
+<IfModule mpm_worker_module>
+ StartServers 1
+ MinSpareThreads 1
+ MaxSpareThreads 1
+ ThreadLimit 1
+ ThreadsPerChild 1
+ MaxClients 1
+ MaxRequestsPerChild 0
+</IfModule>
+
ServerRoot %%SERVER_ROOT%%
PidFile %%PID_FILE%%
LockFile %%LOCK_FILE%%
commit 48446f767f13ec5b62a4d2dea94c778c50a2002d
Author: sunnavy <sunnavy at bestpractical.com>
Date: Mon Dec 13 18:33:46 2010 +0800
no need to skip this since we made apache test single process
diff --git a/t/web/query_log.t b/t/web/query_log.t
index 0a623cb..25edfd2 100644
--- a/t/web/query_log.t
+++ b/t/web/query_log.t
@@ -3,9 +3,6 @@ use strict;
use warnings;
use RT::Test tests => 9;
-SKIP: {
- skip 'can not test this with apache(multi-process?)', 9
- if $ENV{RT_TEST_WEB_HANDLER} && $ENV{RT_TEST_WEB_HANDLER} =~ /apache/;
RT->Config->Set(StatementLog => 1);
@@ -21,4 +18,3 @@ $m->text_contains("Executed SQL query at", "stack traces");
$m->text_like(qr/HTML::Mason::Interp::exec\(.*\) called at/, "stack traces");
$m->text_contains("SELECT * FROM Principals WHERE id = '".$root->id."'", "we interpolate bind params");
-}
commit 43ed7e06b2565bc8080213bc6b8e6665c4c5c673
Author: sunnavy <sunnavy at bestpractical.com>
Date: Mon Dec 13 18:34:30 2010 +0800
to make stashwarning work for external servers
diff --git a/sbin/rt-server.in b/sbin/rt-server.in
index 6070a0b..b6c82db 100755
--- a/sbin/rt-server.in
+++ b/sbin/rt-server.in
@@ -136,6 +136,18 @@ require RT::Interface::Web::Handler;
my $app = RT::Interface::Web::Handler->PSGIApp;
if ($ENV{RT_TESTING}) {
+ my $screen_logger = $RT::Logger->remove('screen');
+ require Log::Dispatch::Perl;
+ $RT::Logger->add(
+ Log::Dispatch::Perl->new(
+ name => 'rttest',
+ min_level => $screen_logger->min_level,
+ action => {
+ error => 'warn',
+ critical => 'warn'
+ }
+ )
+ );
require Plack::Middleware::Test::StashWarnings;
$app = Plack::Middleware::Test::StashWarnings->wrap($app);
}
commit 1aa8e01413c4fdd59fd26c193f5755ae020871ac
Author: sunnavy <sunnavy at bestpractical.com>
Date: Mon Dec 13 18:35:07 2010 +0800
stash warning with external servers works now
diff --git a/lib/RT/Test/Web.pm b/lib/RT/Test/Web.pm
index 80f41fe..00d7ea3 100644
--- a/lib/RT/Test/Web.pm
+++ b/lib/RT/Test/Web.pm
@@ -194,14 +194,6 @@ sub warning_like {
my $name = shift;
local $Test::Builder::Level = $Test::Builder::Level + 1;
- if ( $ENV{'RT_TEST_WEB_HANDLER'}
- && $ENV{'RT_TEST_WEB_HANDLER'} =~ /apache/ )
- {
-
- # to make test number right, 1 for the real test, 1 for get_warnings
- Test::More::pass($name) for 1 .. 2;
- return 1;
- }
my @warnings = $self->get_warnings;
if (@warnings == 0) {
@@ -225,14 +217,6 @@ sub next_warning_like {
my $name = shift;
local $Test::Builder::Level = $Test::Builder::Level + 1;
- if ( $ENV{'RT_TEST_WEB_HANDLER'}
- && $ENV{'RT_TEST_WEB_HANDLER'} =~ /apache/ )
- {
-
- # to make test number right, 1 for the real test, 1 for get_warnings
- Test::More::pass($name) for 1 .. 2;
- return 1;
- }
if (@{ $self->{stashed_server_warnings} || [] } == 0) {
my @warnings = $self->get_warnings;
@@ -255,13 +239,6 @@ sub no_warnings_ok {
my $name = shift || "no warnings emitted";
local $Test::Builder::Level = $Test::Builder::Level + 1;
- if ( $ENV{'RT_TEST_WEB_HANDLER'}
- && $ENV{'RT_TEST_WEB_HANDLER'} =~ /apache/ )
- {
- # to make test number right, 1 for the real test, 1 for get_warnings
- Test::More::pass($name) for 1 .. 2;
- return 1;
- }
my @warnings = $self->get_warnings;
@@ -279,12 +256,6 @@ sub no_leftover_warnings_ok {
my $name = shift || "no leftover warnings";
local $Test::Builder::Level = $Test::Builder::Level + 1;
- if ( $ENV{'RT_TEST_WEB_HANDLER'}
- && $ENV{'RT_TEST_WEB_HANDLER'} =~ /apache/ )
- {
- Test::More::pass($name);
- return 1;
- }
# we clear the warnings because we don't want to break later tests
# in case there *are* leftover warnings
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list