* test/ruby/test_io.rb (TestIO#pipe): should close write end of pipe

before closing read end, to get rid of timing problem.

* test/ruby/test_io_m17n.rb (TestIO_M17N#pipe): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2010-10-27 09:28:08 +00:00
Родитель 1503e320d9
Коммит 7a5d45fc3c
3 изменённых файлов: 15 добавлений и 8 удалений

Просмотреть файл

@ -1,3 +1,10 @@
Wed Oct 27 18:27:17 2010 NAKAMURA Usaku <usa@ruby-lang.org>
* test/ruby/test_io.rb (TestIO#pipe): should close write end of pipe
before closing read end, to get rid of timing problem.
* test/ruby/test_io_m17n.rb (TestIO_M17N#pipe): ditto.
Wed Oct 27 18:14:27 2010 NAKAMURA Usaku <usa@ruby-lang.org>
* win32/win32.c (rb_w32_getppid): support Win64.

Просмотреть файл

@ -41,14 +41,14 @@ class TestIO < Test::Unit::TestCase
we = $!
end
end
flunk("timeout") unless rt.join(10) && wt.join(10)
flunk("timeout") unless wt.join(10) && rt.join(10)
ensure
r.close unless !r || r.closed?
w.close unless !w || w.closed?
(rt.kill; rt.join) if rt
r.close unless !r || r.closed?
(wt.kill; wt.join) if wt
raise re if re
(rt.kill; rt.join) if rt
raise we if we
raise re if re
end
def with_pipe

Просмотреть файл

@ -38,14 +38,14 @@ class TestIO_M17N < Test::Unit::TestCase
we = $!
end
end
flunk("timeout") unless rt.join(10) && wt.join(10)
flunk("timeout") unless wt.join(10) && rt.join(10)
ensure
r.close unless !r || r.closed?
w.close unless !w || w.closed?
(rt.kill; rt.join) if rt
r.close unless !r || r.closed?
(wt.kill; wt.join) if wt
raise re if re
(rt.kill; rt.join) if rt
raise we if we
raise re if re
end
def with_pipe(*args)