1
0
Fork 0
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:
Eugen Kuksa 2015-04-08 19:34:49 +02:00
parent 60b7c952d5
commit 4fa9fa8960

View file

@ -329,6 +329,22 @@ class TestRetry < Sidekiq::Test
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
before do
@error = nil
@ -347,7 +363,7 @@ class TestRetry < Sidekiq::Test
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(
:exception_caused_by_shutdown?, @error))
end