1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00
This commit is contained in:
Mike Perham 2018-12-28 10:08:24 -08:00
parent b294ca3c57
commit 84d364ccd2

View file

@ -122,33 +122,6 @@ class TestRetryExhausted < Minitest::Test
assert_nil new_worker.exhausted_exception
end
it 'allows a global default handler' do
begin
class Foobar
include Sidekiq::Worker
end
exhausted_job = nil
exhausted_exception = nil
Sidekiq.default_retries_exhausted = lambda do |job, ex|
exhausted_job = job
exhausted_exception = ex
end
f = Foobar.new
raised_error = assert_raises RuntimeError do
handler.local(f, job('retry_count' => 0, 'retry' => 1), 'default') do
raise 'kerblammo!'
end
end
raised_error = raised_error.cause
assert exhausted_job
assert_equal raised_error, exhausted_exception
ensure
Sidekiq.default_retries_exhausted = nil
end
end
it 'allows global failure handlers' do
begin
class Foobar