From 289c19f2f55eacff883c0d99dc1728a08103cdd9 Mon Sep 17 00:00:00 2001 From: John Hawthorn Date: Fri, 7 Jun 2019 13:59:32 -0700 Subject: Set process name of parallelized test workers --- activesupport/lib/active_support/testing/parallelization.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'activesupport/lib') diff --git a/activesupport/lib/active_support/testing/parallelization.rb b/activesupport/lib/active_support/testing/parallelization.rb index f50a5e0554..96518a4a58 100644 --- a/activesupport/lib/active_support/testing/parallelization.rb +++ b/activesupport/lib/active_support/testing/parallelization.rb @@ -72,7 +72,11 @@ module ActiveSupport def start @pool = @queue_size.times.map do |worker| + title = "Rails test worker #{worker}" + fork do + Process.setproctitle("#{title} - (starting)") + DRb.stop_service begin @@ -85,6 +89,9 @@ module ActiveSupport klass = job[0] method = job[1] reporter = job[2] + + Process.setproctitle("#{title} - #{klass}##{method}") + result = klass.with_info_handler reporter do Minitest.run_one_method(klass, method) end @@ -99,8 +106,12 @@ module ActiveSupport end queue.record(reporter, result) end + + Process.setproctitle("#{title} - (idle)") end ensure + Process.setproctitle("#{title} - (stopping)") + run_cleanup(worker) end end -- cgit v1.2.3