summaryrefslogtreecommitdiff
path: root/test/thread
diff options
context:
space:
mode:
Diffstat (limited to 'test/thread')
-rw-r--r--test/thread/test_queue.rb21
1 files changed, 11 insertions, 10 deletions
diff --git a/test/thread/test_queue.rb b/test/thread/test_queue.rb
index 1dfcd075fa..9d2f22ff56 100644
--- a/test/thread/test_queue.rb
+++ b/test/thread/test_queue.rb
@@ -58,16 +58,17 @@ class TestQueue < Test::Unit::TestCase
def test_thr_kill
bug5343 = '[ruby-core:39634]'
assert_normal_exit(<<-'_eom', bug5343)
- require "thread"
- queue = Queue.new
- r, w = IO.pipe
- th = Thread.start {
- queue.push(nil)
- r.read 1
- }
- queue.pop
- th.kill.join
+ 2000.times do
+ require "thread"
+ queue = Queue.new
+ r, w = IO.pipe
+ th = Thread.start {
+ queue.push(nil)
+ r.read 1
+ }
+ queue.pop
+ th.kill.join
+ end
_eom
end
-
end