-
Notifications
You must be signed in to change notification settings - Fork 21.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix activejob integration test #19470
Conversation
troter
commented
Mar 23, 2015
- fix activejob integration test's queue_adapter initialization.
- avoid double initialization error caused to sidekiq
In 4-2-stable, initialzers related ActiveJob are executed in this order. 1. active_job.set_config 2. load_config_initializers In master, same initializers are executed in this order. 1. load_config_initializers 2. active_job.set_config As a result, ActiveJob's integration test always use InlineAdapter in master.
Sidekiq::CLI#boot_system require "#{dummy_app_path}/config/environment.rb". But this file has already been required in 'test/support/integration/helper.rb'.
If what you wrote about initializers orders is true this is a bug in the code, not in the test suite. Also can we not call |
@rafaelfranca thank you for your comments.
This is initializer dipendencies of 4-2-stable and master.
I guess that it is possible to call a |
Could you print the actual initializer order instead of the order by name and run the compare them? @mperham what do you think about troter@3184b96? |
Yeah, just found that |
@rafaelfranca I would use Sidekiq::Launcher. The CLI code is not designed to run within another process. |
They may be fixed at #19470
Sidekiq::CLI#boot_system require "#{dummy_app_path}/config/environment.rb". But this file has already been required in'test/support/integration/helper.rb'. This patch will change to use Sidekiq::Launcher directly.
@rafaelfranca I add commit 9c047c8, this change use |
Thank you. Merged at b126e7a |