From 5545f6a771f5b0cb19e8491cc7c0d9cf15037a25 Mon Sep 17 00:00:00 2001 From: Eugene Kenny Date: Sun, 1 Sep 2019 23:31:21 +0200 Subject: [PATCH] Fix Active Job Sidekiq integration tests The `Sidekiq::Logging` module was removed in Sidekiq 6.0 in favour of `Sidekiq.logger=`. https://github.com/mperham/sidekiq/wiki/Logging#api-changes > The old Sidekiq::Logging class was removed in Sidekiq 6.0. You should > not be accessing any Sidekiq internal classes to use the logger. Use > `logger` directly in your Worker or use `Sidekiq.logger` elsewhere. --- Gemfile.lock | 11 ++++++----- .../test/support/integration/adapters/sidekiq.rb | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 5c5aa3f936..b1dc4fb393 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -389,7 +389,7 @@ GEM ffi (~> 1.0) rdoc (6.0.4) redcarpet (3.2.3) - redis (4.1.1) + redis (4.1.2) redis-namespace (1.6.0) redis (>= 3.0.4) regexp_parser (1.6.0) @@ -448,10 +448,11 @@ GEM sequel (5.14.0) serverengine (2.0.7) sigdump (~> 0.2.2) - sidekiq (5.2.3) - connection_pool (~> 2.2, >= 2.2.2) - rack-protection (>= 1.5.0) - redis (>= 3.3.5, < 5) + sidekiq (6.0.0) + connection_pool (>= 2.2.2) + rack (>= 2.0.0) + rack-protection (>= 2.0.0) + redis (>= 4.1.0) sigdump (0.2.4) signet (0.11.0) addressable (~> 2.3) diff --git a/activejob/test/support/integration/adapters/sidekiq.rb b/activejob/test/support/integration/adapters/sidekiq.rb index c79de12eaf..0c01f4e83e 100644 --- a/activejob/test/support/integration/adapters/sidekiq.rb +++ b/activejob/test/support/integration/adapters/sidekiq.rb @@ -36,7 +36,7 @@ module SidekiqJobsManager $stderr.sync = true logfile = Rails.root.join("log/sidekiq.log").to_s - Sidekiq::Logging.initialize_logger(logfile) + Sidekiq.logger = Sidekiq::Logger.new(logfile) self_read, self_write = IO.pipe trap "TERM" do