Closed maxrosecollins closed 1 year ago
I managed to test this way (running sidekiq 5.2.7):
class WorkerEvent
include Sidekiq::Worker
sidekiq_options retry: 5
sidekiq_retry_in { 600 }
end
RSpec.describe WorkerEvent do
describe 'retry' do
subject(:config) { described_class }
it { is_expected.to be_retryable 5 }
it 'delays the retries in 10 minutes' do
expect(config.sidekiq_retry_in_block.call).to eq 600
end
end
end
I checked the docs but couldn't see it. How am I able to test the
sidekiq_retry_in
with rspec?Thanks!