@@ -162,7 +162,7 @@ class InstrumentationTest < ActiveSupport::TestCase
162162
163163 test "errors when deregistering processes are included in deregister_process events" do
164164 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" )
166166 SolidQueue ::Process . any_instance . expects ( :destroy! ) . raises ( error ) . at_least_once
167167
168168 events = subscribed ( "deregister_process.solid_queue" ) do
@@ -182,7 +182,7 @@ class InstrumentationTest < ActiveSupport::TestCase
182182 end
183183
184184 test "retrying failed job emits retry event" do
185- RaisingJob . perform_later ( RuntimeError , "A" )
185+ RaisingJob . perform_later ( ExpectedTestError , "A" )
186186 job = SolidQueue ::Job . last
187187
188188 worker = SolidQueue ::Worker . new . tap ( &:start )
@@ -198,7 +198,7 @@ class InstrumentationTest < ActiveSupport::TestCase
198198 end
199199
200200 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" ) }
202202 AddToBufferJob . perform_later ( "A" )
203203
204204 jobs = SolidQueue ::Job . last ( 4 )
@@ -392,7 +392,7 @@ class InstrumentationTest < ActiveSupport::TestCase
392392 test "thread errors emit thread_error events" do
393393 previous_thread_report_on_exception , Thread . report_on_exception = Thread . report_on_exception , false
394394
395- error = RuntimeError . new ( "everything is broken" )
395+ error = ExpectedTestError . new ( "everything is broken" )
396396 SolidQueue ::ClaimedExecution ::Result . expects ( :new ) . raises ( error ) . at_least_once
397397
398398 AddToBufferJob . perform_later "hey!"
0 commit comments