[Rt-commit] rt branch, 4.0/clear-callback-cache-in-inline-tests, created. rt-4.0.7-54-gd2d0b97

Alex Vandiver alexmv at bestpractical.com
Wed Aug 29 18:38:45 EDT 2012


The branch, 4.0/clear-callback-cache-in-inline-tests has been created
        at  d2d0b97fa5e0954814c994794c0aca9f9c3c0703 (commit)

- Log -----------------------------------------------------------------
commit d2d0b97fa5e0954814c994794c0aca9f9c3c0703
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Wed Aug 29 18:37:34 2012 -0400

    Make tests pass on inline server, which caches callbacks across restarts

diff --git a/lib/RT/Interface/Web/Request.pm b/lib/RT/Interface/Web/Request.pm
index d086511..43581ec 100644
--- a/lib/RT/Interface/Web/Request.pm
+++ b/lib/RT/Interface/Web/Request.pm
@@ -142,6 +142,10 @@ sub callback {
     }
     return @rv;
 }
+
+sub clear_callback_cache {
+    %cache = %called = ();
+}
 }
 
 =head2 request_path
diff --git a/lib/RT/Test.pm b/lib/RT/Test.pm
index 3e7c910..36f0f87 100644
--- a/lib/RT/Test.pm
+++ b/lib/RT/Test.pm
@@ -1413,6 +1413,8 @@ sub start_inline_server {
     # Clear out squished CSS and JS cache, since it's retained across
     # servers, since it's in-process
     RT::Interface::Web->ClearSquished;
+    require RT::Interface::Web::Request;
+    RT::Interface::Web::Request->clear_callback_cache;
 
     Test::More::ok(1, "psgi test server ok");
     $TEST_APP = $self->test_app(@_);

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


More information about the Rt-commit mailing list