File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ class InfiniteRecursionJob < ApplicationJob
33
44 def perform
55 start
6+ rescue SystemStackError
7+ raise ExpectedTestError , "stack level too deep"
68 end
79
810 private
Original file line number Diff line number Diff line change @@ -15,13 +15,12 @@ class SolidQueue::FailedExecutionTest < ActiveSupport::TestCase
1515 end
1616
1717 test "run job that fails with a SystemStackError (stack level too deep)" do
18- silence_on_thread_error_for ( SystemStackError ) do
19- InfiniteRecursionJob . perform_later
20- @worker . start
18+ InfiniteRecursionJob . perform_later
19+ @worker . start
2120
22- assert_equal 1 , SolidQueue ::FailedExecution . count
23- assert SolidQueue ::Job . last . failed?
24- end
21+ assert_equal 1 , SolidQueue ::FailedExecution . count
22+ assert SolidQueue ::Job . last . failed?
23+ assert_equal "stack level too deep" , SolidQueue :: FailedExecution . last . message
2524 end
2625
2726 test "retry failed job" do
You can’t perform that action at this time.
0 commit comments