diff options
-rw-r--r-- | actionpack/test/activerecord/controller_runtime_test.rb | 2 | ||||
-rw-r--r-- | actionpack/test/controller/caching_test.rb | 2 | ||||
-rw-r--r-- | actionpack/test/controller/logging_test.rb | 1 | ||||
-rw-r--r-- | actionpack/test/dispatch/show_exceptions_test.rb | 3 |
4 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/test/activerecord/controller_runtime_test.rb b/actionpack/test/activerecord/controller_runtime_test.rb index 6f30bec8ee..9525dd8307 100644 --- a/actionpack/test/activerecord/controller_runtime_test.rb +++ b/actionpack/test/activerecord/controller_runtime_test.rb @@ -23,6 +23,8 @@ class ARLoggingTest < ActionController::TestCase end def test_log_with_active_record + # Wait pending notifications to be published + wait get :show wait assert_match /ActiveRecord runtime/, @controller.logger.logged[3] diff --git a/actionpack/test/controller/caching_test.rb b/actionpack/test/controller/caching_test.rb index 54d1a72f1f..5a8dc0c358 100644 --- a/actionpack/test/controller/caching_test.rb +++ b/actionpack/test/controller/caching_test.rb @@ -630,6 +630,8 @@ class FragmentCachingTest < ActionController::TestCase end def test_fragment_for_logging + # Wait pending notifications to be published + ActiveSupport::Notifications.notifier.wait @controller.logger = MockLogger.new fragment_computed = false diff --git a/actionpack/test/controller/logging_test.rb b/actionpack/test/controller/logging_test.rb index 6b9db88d83..594cf17312 100644 --- a/actionpack/test/controller/logging_test.rb +++ b/actionpack/test/controller/logging_test.rb @@ -19,6 +19,7 @@ class LoggingTest < ActionController::TestCase def setup super + wait # Wait pending notifications to be published set_logger end diff --git a/actionpack/test/dispatch/show_exceptions_test.rb b/actionpack/test/dispatch/show_exceptions_test.rb index 170b157d17..951fb4a22e 100644 --- a/actionpack/test/dispatch/show_exceptions_test.rb +++ b/actionpack/test/dispatch/show_exceptions_test.rb @@ -106,6 +106,9 @@ class ShowExceptionsTest < ActionController::IntegrationTest end test "publishes notifications" do + # Wait pending notifications to be published + ActiveSupport::Notifications.notifier.wait + @app, event = ProductionApp, nil self.remote_addr = '127.0.0.1' |