The test added in r34034 needs to run thousands of times.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2011-12-14 02:26:17 +00:00
parent f2fff83e96
commit 24c3766624

View File

@ -58,16 +58,17 @@ class TestQueue < Test::Unit::TestCase
def test_thr_kill def test_thr_kill
bug5343 = '[ruby-core:39634]' bug5343 = '[ruby-core:39634]'
assert_normal_exit(<<-'_eom', bug5343) assert_normal_exit(<<-'_eom', bug5343)
require "thread" 2000.times do
queue = Queue.new require "thread"
r, w = IO.pipe queue = Queue.new
th = Thread.start { r, w = IO.pipe
queue.push(nil) th = Thread.start {
r.read 1 queue.push(nil)
} r.read 1
queue.pop }
th.kill.join queue.pop
th.kill.join
end
_eom _eom
end end
end end