From 05f78a6fd28519feb29e2ea9cd9d90601b08765c Mon Sep 17 00:00:00 2001 From: ngoto Date: Mon, 22 Jun 2015 09:21:53 +0000 Subject: [PATCH] * test/lib/test/unit.rb (Test::Unit::Parallel#start_watchdog): removed because it has been meaningless since r36385. [Bug:11288] * test/lib/test/unit.rb (Test::Unit::Parallel#_run_parallel): delete lines related to the removed start_watchdog method git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 8 ++++++++ test/lib/test/unit.rb | 20 -------------------- 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6cd22079a7..0d24ce835f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Mon Jun 22 18:08:48 2015 Naohisa Goto + + * test/lib/test/unit.rb (Test::Unit::Parallel#start_watchdog): removed + because it has been meaningless since r36385. [Bug:11288] + + * test/lib/test/unit.rb (Test::Unit::Parallel#_run_parallel): delete + lines related to the removed start_watchdog method + Sun Jun 21 23:52:46 2015 Kazuhiro NISHIYAMA * NEWS: mention Array#bsearch_index and Hash#fetch_values. diff --git a/test/lib/test/unit.rb b/test/lib/test/unit.rb index 9d9ff4bdf3..3c022b71a5 100644 --- a/test/lib/test/unit.rb +++ b/test/lib/test/unit.rb @@ -314,22 +314,6 @@ module Test end end - def start_watchdog - Thread.new do - while stat = Process.wait2 - break if @interrupt # Break when interrupt - pid, stat = stat - w = (@workers + @dead_workers).find{|x| pid == x.pid } - next unless w - w = w.dup - if w.status != :quit && !w.quit_called? - # Worker down - w.died(nil, !stat.signaled? && stat.exitstatus) - end - end - end - end - def deal(io, type, result, rep, shutting_down = false) worker = @workers_hash[io] cmd = worker.read @@ -404,9 +388,6 @@ module Test @workers_hash = {} # out-IO => worker @ios = [] # Array of worker IOs begin - # Thread: watchdog - watchdog = start_watchdog - @options[:parallel].times {launch_worker} while _io = IO.select(@ios)[0] @@ -420,7 +401,6 @@ module Test @interrupt = ex return result ensure - watchdog.kill if watchdog if @interrupt @ios.select!{|x| @workers_hash[x].status == :running } while !@ios.empty? && (__io = IO.select(@ios,[],[],10))