mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Merge pull request #1330 from kevinzen/jruby_fix_tests
fix issues with jruby failing tests
This commit is contained in:
commit
96961866f8
2 changed files with 7 additions and 7 deletions
|
@ -82,7 +82,7 @@ class TestMiddleware < Sidekiq::Test
|
||||||
processor = Sidekiq::Processor.new(boss)
|
processor = Sidekiq::Processor.new(boss)
|
||||||
actor = Minitest::Mock.new
|
actor = Minitest::Mock.new
|
||||||
actor.expect(:processor_done, nil, [processor])
|
actor.expect(:processor_done, nil, [processor])
|
||||||
actor.expect(:real_thread, nil, [nil, Celluloid::Thread])
|
actor.expect(:real_thread, nil, [nil, Thread])
|
||||||
boss.expect(:async, actor, [])
|
boss.expect(:async, actor, [])
|
||||||
boss.expect(:async, actor, [])
|
boss.expect(:async, actor, [])
|
||||||
processor.process(Sidekiq::BasicFetch::UnitOfWork.new('queue:default', msg))
|
processor.process(Sidekiq::BasicFetch::UnitOfWork.new('queue:default', msg))
|
||||||
|
|
|
@ -31,7 +31,7 @@ class TestProcessor < Sidekiq::Test
|
||||||
msg = Sidekiq.dump_json({ 'class' => MockWorker.to_s, 'args' => ['myarg'] })
|
msg = Sidekiq.dump_json({ 'class' => MockWorker.to_s, 'args' => ['myarg'] })
|
||||||
actor = Minitest::Mock.new
|
actor = Minitest::Mock.new
|
||||||
actor.expect(:processor_done, nil, [@processor])
|
actor.expect(:processor_done, nil, [@processor])
|
||||||
actor.expect(:real_thread, nil, [nil, Celluloid::Thread])
|
actor.expect(:real_thread, nil, [nil, Thread])
|
||||||
@boss.expect(:async, actor, [])
|
@boss.expect(:async, actor, [])
|
||||||
@boss.expect(:async, actor, [])
|
@boss.expect(:async, actor, [])
|
||||||
@processor.process(work(msg))
|
@processor.process(work(msg))
|
||||||
|
@ -41,7 +41,7 @@ class TestProcessor < Sidekiq::Test
|
||||||
|
|
||||||
it 'passes exceptions to ExceptionHandler' do
|
it 'passes exceptions to ExceptionHandler' do
|
||||||
actor = Minitest::Mock.new
|
actor = Minitest::Mock.new
|
||||||
actor.expect(:real_thread, nil, [nil, Celluloid::Thread])
|
actor.expect(:real_thread, nil, [nil, Thread])
|
||||||
@boss.expect(:async, actor, [])
|
@boss.expect(:async, actor, [])
|
||||||
msg = Sidekiq.dump_json({ 'class' => MockWorker.to_s, 'args' => ['boom'] })
|
msg = Sidekiq.dump_json({ 'class' => MockWorker.to_s, 'args' => ['boom'] })
|
||||||
begin
|
begin
|
||||||
|
@ -57,7 +57,7 @@ class TestProcessor < Sidekiq::Test
|
||||||
msg = Sidekiq.dump_json({ 'class' => MockWorker.to_s, 'args' => ['boom'] })
|
msg = Sidekiq.dump_json({ 'class' => MockWorker.to_s, 'args' => ['boom'] })
|
||||||
re_raise = false
|
re_raise = false
|
||||||
actor = Minitest::Mock.new
|
actor = Minitest::Mock.new
|
||||||
actor.expect(:real_thread, nil, [nil, Celluloid::Thread])
|
actor.expect(:real_thread, nil, [nil, Thread])
|
||||||
@boss.expect(:async, actor, [])
|
@boss.expect(:async, actor, [])
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
@ -75,7 +75,7 @@ class TestProcessor < Sidekiq::Test
|
||||||
processor = ::Sidekiq::Processor.new(@boss)
|
processor = ::Sidekiq::Processor.new(@boss)
|
||||||
actor = Minitest::Mock.new
|
actor = Minitest::Mock.new
|
||||||
actor.expect(:processor_done, nil, [processor])
|
actor.expect(:processor_done, nil, [processor])
|
||||||
actor.expect(:real_thread, nil, [nil, Celluloid::Thread])
|
actor.expect(:real_thread, nil, [nil, Thread])
|
||||||
@boss.expect(:async, actor, [])
|
@boss.expect(:async, actor, [])
|
||||||
@boss.expect(:async, actor, [])
|
@boss.expect(:async, actor, [])
|
||||||
processor.process(work(msgstr))
|
processor.process(work(msgstr))
|
||||||
|
@ -103,7 +103,7 @@ class TestProcessor < Sidekiq::Test
|
||||||
def successful_job
|
def successful_job
|
||||||
msg = Sidekiq.dump_json({ 'class' => MockWorker.to_s, 'args' => ['myarg'] })
|
msg = Sidekiq.dump_json({ 'class' => MockWorker.to_s, 'args' => ['myarg'] })
|
||||||
actor = Minitest::Mock.new
|
actor = Minitest::Mock.new
|
||||||
actor.expect(:real_thread, nil, [nil, Celluloid::Thread])
|
actor.expect(:real_thread, nil, [nil, Thread])
|
||||||
actor.expect(:processor_done, nil, [@processor])
|
actor.expect(:processor_done, nil, [@processor])
|
||||||
@boss.expect(:async, actor, [])
|
@boss.expect(:async, actor, [])
|
||||||
@boss.expect(:async, actor, [])
|
@boss.expect(:async, actor, [])
|
||||||
|
@ -131,7 +131,7 @@ class TestProcessor < Sidekiq::Test
|
||||||
|
|
||||||
def failed_job
|
def failed_job
|
||||||
actor = Minitest::Mock.new
|
actor = Minitest::Mock.new
|
||||||
actor.expect(:real_thread, nil, [nil, Celluloid::Thread])
|
actor.expect(:real_thread, nil, [nil, Thread])
|
||||||
@boss.expect(:async, actor, [])
|
@boss.expect(:async, actor, [])
|
||||||
msg = Sidekiq.dump_json({ 'class' => MockWorker.to_s, 'args' => ['boom'] })
|
msg = Sidekiq.dump_json({ 'class' => MockWorker.to_s, 'args' => ['boom'] })
|
||||||
begin
|
begin
|
||||||
|
|
Loading…
Reference in a new issue