diff --git a/ruby/lib/ci/queue.rb b/ruby/lib/ci/queue.rb index 8cf0a167..145f51db 100644 --- a/ruby/lib/ci/queue.rb +++ b/ruby/lib/ci/queue.rb @@ -21,6 +21,8 @@ module Queue attr_accessor :shuffler, :requeueable + Error = Class.new(StandardError) + module Warnings RESERVED_LOST_TEST = :RESERVED_LOST_TEST end diff --git a/ruby/lib/ci/queue/redis.rb b/ruby/lib/ci/queue/redis.rb index 5c17e253..3b00308c 100644 --- a/ruby/lib/ci/queue/redis.rb +++ b/ruby/lib/ci/queue/redis.rb @@ -14,9 +14,8 @@ module CI module Queue module Redis - Error = Class.new(StandardError) - LostMaster = Class.new(Error) - ReservationError = Class.new(Error) + LostMaster = Class.new(CI::Queue::Error) + ReservationError = Class.new(CI::Queue::Error) class << self diff --git a/ruby/lib/minitest/queue.rb b/ruby/lib/minitest/queue.rb index ef71c43f..a32782d4 100644 --- a/ruby/lib/minitest/queue.rb +++ b/ruby/lib/minitest/queue.rb @@ -266,7 +266,7 @@ def run_from_queue(reporter, *) reopen_previous_step puts red("The heartbeat process died. This worker is exiting early.") exit!(41) - rescue CI::Queue::Redis::Error + rescue CI::Queue::Error reopen_previous_step puts red("#{error.class}: #{error.message}") error.backtrace.each do |frame|