diff --git a/activejob/test/cases/logging_test.rb b/activejob/test/cases/logging_test.rb index 4041f5f8c0..2e8d2ef7c0 100644 --- a/activejob/test/cases/logging_test.rb +++ b/activejob/test/cases/logging_test.rb @@ -160,7 +160,7 @@ class LoggingTest < ActiveSupport::TestCase end def test_job_error_logging - RescueJob.perform_later "other" + perform_enqueued_jobs { RescueJob.perform_later "other" } rescue RescueJob::OtherError assert_match(/Performing RescueJob \(Job ID: .*?\) from .*? with arguments:.*other/, @logger.messages) assert_match(/Error performing RescueJob \(Job ID: .*?\) from .*? in .*ms: RescueJob::OtherError \(Bad hair\):\n.*\brescue_job\.rb:\d+:in `perform'/, @logger.messages)