diff --git a/lib/job-iteration/iteration.rb b/lib/job-iteration/iteration.rb index 7a6224a2..11edf7bd 100644 --- a/lib/job-iteration/iteration.rb +++ b/lib/job-iteration/iteration.rb @@ -125,6 +125,8 @@ def deserialize(job_data) # @private def perform(*params) # @private interruptible_perform(*params) + + nil end def retry_job(*, **) diff --git a/test/unit/iteration_test.rb b/test/unit/iteration_test.rb index 36198b7e..642b1f8c 100644 --- a/test/unit/iteration_test.rb +++ b/test/unit/iteration_test.rb @@ -485,6 +485,11 @@ def test_nested_each_iteration_instrumentation assert_equal(expected, events) end + def test_perform_returns_nil + # i.e. perform is "void", and nobody should depend on the return value + assert_nil(JobWithRightMethods.perform_now({})) + end + private # Allows building job classes that read max_job_runtime during the test,