Skip to content

Commit 896912c

Browse files
p-schlickmannrosa
authored andcommitted
supressing expected warning for test suite
1 parent 74b12c8 commit 896912c

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

test/dummy/app/jobs/infinite_recursion_job.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff 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

test/models/solid_queue/failed_execution_test.rb

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)