mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
fix test
This commit is contained in:
parent
b294ca3c57
commit
84d364ccd2
1 changed files with 0 additions and 27 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue