aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorJohn Hawthorn <john@hawthorn.email>2019-07-06 13:00:30 -0700
committerGitHub <noreply@github.com>2019-07-06 13:00:30 -0700
commit74ef67b16de67d2ae2f996e50a18a93aebf68fe6 (patch)
treed78749de25af4e00cbca3fc7da6f8c2b2fbbcff5 /activesupport/lib
parentbf7ce13908636f619f9c7fe597e493bce2041c8e (diff)
parent289c19f2f55eacff883c0d99dc1728a08103cdd9 (diff)
downloadrails-74ef67b16de67d2ae2f996e50a18a93aebf68fe6.tar.gz
rails-74ef67b16de67d2ae2f996e50a18a93aebf68fe6.tar.bz2
rails-74ef67b16de67d2ae2f996e50a18a93aebf68fe6.zip
Merge pull request #36443 from jhawthorn/as_parallelization_process_name
Set process title of parallelized test workers
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/testing/parallelization.rb11
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