1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Improve test coverage for handling signals

This commit is contained in:
Chris Kershaw 2016-01-01 11:58:42 -05:00
parent b85e109f2f
commit c71c5196c0

View file

@ -317,8 +317,20 @@ class TestCli < Sidekiq::Test
assert_raises Interrupt do
cli.handle_signal('TERM')
end
cli.handle_signal('USR2')
cli.stub(:launcher , OpenStruct.new) do
cli.handle_signal('USR1')
end
options_with_log = Sidekiq.options.merge(:logfile => 'tmp/test.log')
Sidekiq.stub(:options, options_with_log) do
cli.handle_signal('USR2')
end
cli.handle_signal('TTIN')
Thread.stub(:list, [OpenStruct.new]) do
cli.handle_signal('TTIN')
end
end
it 'can fire events' do