summaryrefslogtreecommitdiff
path: root/test/testunit
diff options
context:
space:
mode:
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