提交 f2d276fe 编写于 作者: J José Valim

Ensure no notification is on the queue before running notifications related tests.

上级 53c69849
......@@ -23,6 +23,8 @@ def wait
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]
......
......@@ -630,6 +630,8 @@ def test_fragment_for
end
def test_fragment_for_logging
# Wait pending notifications to be published
ActiveSupport::Notifications.notifier.wait
@controller.logger = MockLogger.new
fragment_computed = false
......
......@@ -19,6 +19,7 @@ class LoggingTest < ActionController::TestCase
def setup
super
wait # Wait pending notifications to be published
set_logger
end
......
......@@ -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'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册