diff options
author | John Hawthorn <john@hawthorn.email> | 2019-06-07 13:59:32 -0700 |
---|---|---|
committer | John Hawthorn <john@hawthorn.email> | 2019-06-07 15:29:31 -0700 |
commit | 289c19f2f55eacff883c0d99dc1728a08103cdd9 (patch) | |
tree | 1cc1eef8ce084aa0a83b1b90d64255241b8832db /activesupport | |
parent | dc2a5d4c3407dc8dc12b389f845b7797bafdfdd7 (diff) | |
download | rails-289c19f2f55eacff883c0d99dc1728a08103cdd9.tar.gz rails-289c19f2f55eacff883c0d99dc1728a08103cdd9.tar.bz2 rails-289c19f2f55eacff883c0d99dc1728a08103cdd9.zip |
Set process name of parallelized test workers
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/testing/parallelization.rb | 11 |
1 files changed, 11 insertions, 0 deletions
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 |