mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Add test: normal error without cause, fix typo.
This commit is contained in:
parent
60b7c952d5
commit
4fa9fa8960
1 changed files with 17 additions and 1 deletions
|
@ -329,6 +329,22 @@ class TestRetry < Sidekiq::Test
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe 'handles errors withouth cause' do
|
||||||
|
before do
|
||||||
|
@error = nil
|
||||||
|
begin
|
||||||
|
raise ::StandardError, 'Error'
|
||||||
|
rescue ::StandardError => e
|
||||||
|
@error = e
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
it "does not recurse infinitely checking if it's a shutdown" do
|
||||||
|
assert(!Sidekiq::Middleware::Server::RetryJobs.new.send(
|
||||||
|
:exception_caused_by_shutdown?, @error))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
describe 'handles errors with circular causes' do
|
describe 'handles errors with circular causes' do
|
||||||
before do
|
before do
|
||||||
@error = nil
|
@error = nil
|
||||||
|
@ -347,7 +363,7 @@ class TestRetry < Sidekiq::Test
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
it "does not recurse infinitely checking if it's a shudtown" do
|
it "does not recurse infinitely checking if it's a shutdown" do
|
||||||
assert(!Sidekiq::Middleware::Server::RetryJobs.new.send(
|
assert(!Sidekiq::Middleware::Server::RetryJobs.new.send(
|
||||||
:exception_caused_by_shutdown?, @error))
|
:exception_caused_by_shutdown?, @error))
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue