From 6e6e2b9457f446849fe125f594280e96f4c9456c Mon Sep 17 00:00:00 2001 From: Juanito Fatas Date: Thu, 9 Jun 2022 23:28:33 +0900 Subject: [PATCH] Prepare for upcoming Sidekiq Configuration design Reference commit: https://github.com/mperham/sidekiq/commit/67daa7a408b214d593100f782271ed108686c147 While the docs[1] suggests to use Sidekiq::Config, but it is not available yet. So uses Sidekiq instead to make activejob integration tests work. [1]https://github.com/mperham/sidekiq/blob/main/docs/global_to_local.md#explicit-configuration --- activejob/test/support/integration/adapters/sidekiq.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/activejob/test/support/integration/adapters/sidekiq.rb b/activejob/test/support/integration/adapters/sidekiq.rb index 0c01f4e83e..51cd71b8c9 100644 --- a/activejob/test/support/integration/adapters/sidekiq.rb +++ b/activejob/test/support/integration/adapters/sidekiq.rb @@ -53,10 +53,12 @@ module SidekiqJobsManager require "sidekiq/cli" require "sidekiq/launcher" - sidekiq = Sidekiq::Launcher.new(queues: ["integration_tests"], - environment: "test", - concurrency: 1, - timeout: 1) + config = Sidekiq + config[:queues] = ["integration_tests"] + config[:environment] = "test" + config[:concurrency] = 1 + config[:timeout] = 1 + sidekiq = Sidekiq::Launcher.new(config) Sidekiq.average_scheduled_poll_interval = 0.5 Sidekiq.options[:poll_interval_average] = 1 begin