From 826fe6ca90ab1df9dfd735b81f94a095a18b67ad Mon Sep 17 00:00:00 2001 From: Nikita Acharya Date: Fri, 15 Sep 2023 10:31:40 -0700 Subject: [PATCH] Exit with status 40 when no master elected --- ruby/lib/minitest/queue/runner.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ruby/lib/minitest/queue/runner.rb b/ruby/lib/minitest/queue/runner.rb index 43adad35..7fa75df4 100644 --- a/ruby/lib/minitest/queue/runner.rb +++ b/ruby/lib/minitest/queue/runner.rb @@ -223,7 +223,7 @@ def report_command unless supervisor.wait_for_workers { display_warnings(supervisor.build) } unless supervisor.queue_initialized? - abort! "No master was elected. Did all workers crash?" + abort! "No master was elected. Did all workers crash?", 40 end unless supervisor.exhausted? @@ -623,10 +623,10 @@ def exit!(*) super end - def abort!(message) + def abort!(message, exit_status=1) reopen_previous_step puts red(message) - exit! 1 # exit! is required to avoid minitest at_exit callback + exit! exit_status # exit! is required to avoid minitest at_exit callback end def retry?