aboutsummaryrefslogtreecommitdiffstats
path: root/test/testunit
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-07 08:56:12 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-07-07 08:56:12 +0000
commit1a1c95404f8842b7327e76e945ef747554e37709 (patch)
tree66d3e2773dfef8c6e2af36aa3fa6837e55359219 /test/testunit
parentcfa0035962f7c373ca612be5bee749803368fd5b (diff)
downloadruby-1a1c95404f8842b7327e76e945ef747554e37709.tar.gz
* test/testunit/test_parallel.rb (TestParallelWorker#teardown): wait
the child process even if the communition pipe is broken. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/testunit')
-rw-r--r--test/testunit/test_parallel.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/testunit/test_parallel.rb b/test/testunit/test_parallel.rb
index 4c4d14b226..c8f6a9ec18 100644
--- a/test/testunit/test_parallel.rb
+++ b/test/testunit/test_parallel.rb
@@ -18,11 +18,14 @@ module TestParallel
def teardown
if @worker_pid && @worker_in
begin
- @worker_in.puts "quit"
+ begin
+ @worker_in.puts "quit"
+ rescue IOError, Errno::EPIPE
+ end
timeout(2) do
Process.waitpid(@worker_pid)
end
- rescue IOError, Errno::EPIPE, Timeout::Error
+ rescue Timeout::Error
begin
Process.kill(:KILL, @worker_pid)
rescue Errno::ESRCH