diff --git a/ruby/Gemfile.lock b/ruby/Gemfile.lock index 3493d939..b7883774 100644 --- a/ruby/Gemfile.lock +++ b/ruby/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - ci-queue (0.85.0) + ci-queue (0.86.0) logger GEM diff --git a/ruby/lib/ci/queue/version.rb b/ruby/lib/ci/queue/version.rb index c95adaa7..90519e6b 100644 --- a/ruby/lib/ci/queue/version.rb +++ b/ruby/lib/ci/queue/version.rb @@ -2,7 +2,7 @@ module CI module Queue - VERSION = '0.85.0' + VERSION = '0.86.0' DEV_SCRIPTS_ROOT = ::File.expand_path('../../../../../redis', __FILE__) RELEASE_SCRIPTS_ROOT = ::File.expand_path('../redis', __FILE__) end diff --git a/ruby/lib/minitest/queue/runner.rb b/ruby/lib/minitest/queue/runner.rb index 8be7551d..5f924ecd 100644 --- a/ruby/lib/minitest/queue/runner.rb +++ b/ruby/lib/minitest/queue/runner.rb @@ -118,6 +118,15 @@ def run_command # minitest/autorun's at_exit hook, which may not be registered since # test files haven't been loaded yet. exit! prevents double-execution # if minitest/autorun was loaded by the leader during streaming. + # + # Re-check exhausted? after booting: slow workers may arrive after the queue + # has been fully drained by faster workers. In that case exit cleanly (0) + # rather than letting Minitest return false for a 0-test run. + if queue.rescue_connection_errors { queue.exhausted? } + puts green('All tests were ran already') + verify_reporters!(reporters) + exit!(0) + end passed = Minitest.run [] verify_reporters!(reporters) exit!(passed ? 0 : 1)