@@ -162,7 +162,7 @@ class InstrumentationTest < ActiveSupport::TestCase
162
162
163
163
test "errors when deregistering processes are included in deregister_process events" do
164
164
previous_thread_report_on_exception , Thread . report_on_exception = Thread . report_on_exception , false
165
- error = RuntimeError . new ( "everything is broken" )
165
+ error = ExpectedTestError . new ( "everything is broken" )
166
166
SolidQueue ::Process . any_instance . expects ( :destroy! ) . raises ( error ) . at_least_once
167
167
168
168
events = subscribed ( "deregister_process.solid_queue" ) do
@@ -182,7 +182,7 @@ class InstrumentationTest < ActiveSupport::TestCase
182
182
end
183
183
184
184
test "retrying failed job emits retry event" do
185
- RaisingJob . perform_later ( RuntimeError , "A" )
185
+ RaisingJob . perform_later ( ExpectedTestError , "A" )
186
186
job = SolidQueue ::Job . last
187
187
188
188
worker = SolidQueue ::Worker . new . tap ( &:start )
@@ -198,7 +198,7 @@ class InstrumentationTest < ActiveSupport::TestCase
198
198
end
199
199
200
200
test "retrying failed jobs in bulk emits retry_all" do
201
- 3 . times { RaisingJob . perform_later ( RuntimeError , "A" ) }
201
+ 3 . times { RaisingJob . perform_later ( ExpectedTestError , "A" ) }
202
202
AddToBufferJob . perform_later ( "A" )
203
203
204
204
jobs = SolidQueue ::Job . last ( 4 )
@@ -392,7 +392,7 @@ class InstrumentationTest < ActiveSupport::TestCase
392
392
test "thread errors emit thread_error events" do
393
393
previous_thread_report_on_exception , Thread . report_on_exception = Thread . report_on_exception , false
394
394
395
- error = RuntimeError . new ( "everything is broken" )
395
+ error = ExpectedTestError . new ( "everything is broken" )
396
396
SolidQueue ::ClaimedExecution ::Result . expects ( :new ) . raises ( error ) . at_least_once
397
397
398
398
AddToBufferJob . perform_later "hey!"
0 commit comments