Skip to content

Commit

Permalink
sidekiq > 7 does not return timeout with queues_cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
aushm committed Sep 6, 2023
1 parent 97bd826 commit 54d11fd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions spec/sidekiq-rate-limiter/fetch_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 54d11fd

Please sign in to comment.