brandonhilkert / sucker_punch

Sucker Punch is a Ruby asynchronous processing library using concurrent-ruby, heavily influenced by Sidekiq and girl_friday.
MIT License
2.64k stars 114 forks source link

Test suite currently broken with JRuby #239

Closed ivoanjo closed 3 years ago

ivoanjo commented 3 years ago

Hello there!

While investigating datadog/dd-trace-rb#1369 (see also the notes left on #235) I noticed that multiple tests are currently broken when the test suite is ran with JRuby. I'm not sure if you were aware (or if it's your goal to support JRuby at all), but I thought of reporting it anyway :)

Run options: --seed 51079

# Running:

.F............FFFF....F..F....F...................

Fabulous run in 9.352818s, 5.3460 runs/s, 7.1636 assertions/s.

  1) Failure:
SuckerPunch::QueueTest#test_returns_queue_stats [/Users/ivo.anjo/upstream/sucker_punch/test/sucker_punch/queue_test.rb:75]:
Expected false to be truthy.

  2) Failure:
SuckerPunch::AsyncSyntaxTest#test_perform_async_runs_job_asynchronously [/Users/ivo.anjo/upstream/sucker_punch/test/sucker_punch/async_syntax_test.rb:19]:
Expected: 1
  Actual: 0

  3) Failure:
SuckerPunch::JobTest#test_perform_async_runs_job_asynchronously [/Users/ivo.anjo/upstream/sucker_punch/test/sucker_punch/job_test.rb:19]:
Expected: 1
  Actual: 0

  4) Failure:
SuckerPunch::JobTest#test_perform_in_runs_job_in_future [/Users/ivo.anjo/upstream/sucker_punch/test/sucker_punch/job_test.rb:36]:
Expected: 1
  Actual: 0

  5) Failure:
SuckerPunch::JobTest#test_processed_jobs_is_incremented_on_successful_completion [/Users/ivo.anjo/upstream/sucker_punch/test/sucker_punch/job_test.rb:111]:
Expected false to be truthy.

  6) Failure:
SuckerPunch::JobTest#test_processed_jobs_is_incremented_when_enqueued_with_perform_in [/Users/ivo.anjo/upstream/sucker_punch/test/sucker_punch/job_test.rb:122]:
Expected false to be truthy.

  7) Failure:
SuckerPunch::JobTest#test_busy_workers_is_incremented_during_job_execution [/Users/ivo.anjo/upstream/sucker_punch/test/sucker_punch/job_test.rb:99]:
Expected false to be truthy.

  8) Failure:
SuckerPunch::JobTest#test_run_perform_delegates_to_instance_perform [/Users/ivo.anjo/upstream/sucker_punch/test/sucker_punch/job_test.rb:88]:
Expected: "fake"
  Actual: true

50 runs, 67 assertions, 8 failures, 0 errors, 0 skips
rake aborted!
Command failed with status (1): [ruby -I"lib:test:lib" -I"/Users/ivo.anjo/.rvm/gems/jruby-9.2.14.0/gems/rake-10.5.0/lib" "/Users/ivo.anjo/.rvm/gems/jruby-9.2.14.0/gems/rake-10.5.0/lib/rake/rake_test_loader.rb" "test/sucker_punch/async_syntax_test.rb" "test/sucker_punch/counter_test.rb" "test/sucker_punch/job_test.rb" "test/sucker_punch/queue_test.rb" "test/sucker_punch_test.rb" ]
/Users/ivo.anjo/.rvm/gems/jruby-9.2.14.0/bin/jruby_executable_hooks:24:in `<main>'
Tasks: TOP => test
(See full trace by running task with --trace)
brandonhilkert commented 3 years ago

PRs welcome 👍🏼

brandonhilkert commented 3 years ago

Fixed in 3.0.1.