Merge pull request #50715 from maximerety/lazy-load-active-job-when-using-test-helper

[Fix #50713] Do not trigger loading of ActiveJob::Base in ActiveJob::TestHelper
This commit is contained in:
Rafael Mendonça França 2024-01-11 14:41:21 -05:00 committed by GitHub
commit cff2eb1be1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,7 @@
* Do not trigger immediate loading of `ActiveJob::Base` when loading `ActiveJob::TestHelper`.
*Maxime Réty*
* Preserve the serialized timezone when deserializing `ActiveSupport::TimeWithZone` arguments.
*Joshua Young*

View File

@ -34,7 +34,9 @@ module ActiveJob
end
end
ActiveJob::Base.include(TestQueueAdapter)
ActiveSupport.on_load(:active_job) do
ActiveJob::Base.include(TestQueueAdapter)
end
def before_setup # :nodoc:
test_adapter = queue_adapter_for_test