зеркало из https://github.com/github/ruby.git
test/unit.rb: extract delete_worker
* lib/test/unit.rb (Test::Unit::Runner#delete_worker): delete dead worker from working set. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
4633ad5d0f
Коммит
4bbb49b848
|
@ -1,4 +1,7 @@
|
|||
Sat Jul 14 16:16:27 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
Sat Jul 14 16:16:32 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* lib/test/unit.rb (Test::Unit::Runner#delete_worker): delete dead
|
||||
worker from working set.
|
||||
|
||||
* lib/test/unit.rb (Test::Unit::Runner#launch_worker): add new worker
|
||||
to working set.
|
||||
|
|
|
@ -468,6 +468,12 @@ module Test
|
|||
worker
|
||||
end
|
||||
|
||||
def delete_worker(worker)
|
||||
@workers_hash.delete worker.io
|
||||
@workers.delete worker
|
||||
@ios.delete worker.io
|
||||
end
|
||||
|
||||
def start_watchdog
|
||||
Thread.new do
|
||||
while stat = Process.wait2
|
||||
|
@ -527,9 +533,7 @@ module Test
|
|||
end
|
||||
else
|
||||
if @options[:separate] && bang.empty?
|
||||
@workers_hash.delete worker.io
|
||||
@workers.delete worker
|
||||
@ios.delete worker.io
|
||||
delete_worker(workers)
|
||||
worker.quit
|
||||
worker = launch_worker
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче