[Rt-commit] rt branch, 4.0/stash-warnings-verbose-option, created. rt-4.0.19-62-g4b88172

? sunnavy sunnavy at bestpractical.com
Thu Apr 3 14:49:42 EDT 2014


The branch, 4.0/stash-warnings-verbose-option has been created
        at  4b881724cb477a1618b65e81863f107bf5890818 (commit)

- Log -----------------------------------------------------------------
commit 4b881724cb477a1618b65e81863f107bf5890818
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Apr 4 02:40:46 2014 +0800

    don't trigger default warning handler for inline servers
    
    we already handle server warnings in StashWarnings middleware, so it's not
    necessary to do so. without this, under TEST_VERBOSE=1 mode, those warnings
    will be bubbled up to Test::NoWarnings handler, which could cause
    Test::NoWarnings::had_no_warnings() to fail.

diff --git a/lib/RT/Test.pm b/lib/RT/Test.pm
index b15c03d..e806f9e 100644
--- a/lib/RT/Test.pm
+++ b/lib/RT/Test.pm
@@ -1462,7 +1462,8 @@ sub test_app {
     }
 
     require Plack::Middleware::Test::StashWarnings;
-    my $stashwarnings = Plack::Middleware::Test::StashWarnings->new;
+    my $stashwarnings = Plack::Middleware::Test::StashWarnings->new(
+        $ENV{'RT_TEST_WEB_HANDLER'} && $ENV{'RT_TEST_WEB_HANDLER'} eq 'inline' ? ( verbose => 0 ) : () );
     $app = $stashwarnings->wrap($app);
 
     if ($server_opt{basic_auth}) {

-----------------------------------------------------------------------


More information about the rt-commit mailing list