From 01f9d7061afefd443944e88f199ee946f6f6ce34 Mon Sep 17 00:00:00 2001 From: Aushadhee Mahakumarage <3639239+aushm@users.noreply.github.com> Date: Tue, 5 Sep 2023 19:50:30 -0500 Subject: [PATCH] sidekiq > 7 does not return timeout with queues_cmd --- spec/sidekiq-rate-limiter/fetch_spec.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/spec/sidekiq-rate-limiter/fetch_spec.rb b/spec/sidekiq-rate-limiter/fetch_spec.rb index bdb4fa8..9e2445a 100644 --- a/spec/sidekiq-rate-limiter/fetch_spec.rb +++ b/spec/sidekiq-rate-limiter/fetch_spec.rb @@ -63,13 +63,16 @@ def perform(arg1, arg2); end timeout = _timeout end - if !Sidekiq::VERSION.start_with?('7.') + expected = [ "queue:#{queue}", "queue:#{another_queue}" ] + + if !Sidekiq::VERSION.start_with?('7.')`` options.merge!(strict: true) + expected.push(timeout) end fetch = described_class.new(options) - expect(fetch.queues_cmd).to eql(["queue:#{queue}", "queue:#{another_queue}", timeout]) + expect(fetch.queues_cmd).to eql(expected) end it 'should retrieve work', queuing: true do