mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
add timeout
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f8a38a36eb
commit
91dfb379ea
1 changed files with 4 additions and 2 deletions
|
@ -74,8 +74,10 @@ class TestConditionVariable < Test::Unit::TestCase
|
|||
condvar.broadcast
|
||||
result << "P2"
|
||||
end
|
||||
nr_threads.times do |i|
|
||||
threads[i].join
|
||||
Timeout.timeout(5) do
|
||||
nr_threads.times do |i|
|
||||
threads[i].join
|
||||
end
|
||||
end
|
||||
|
||||
assert_equal ["C1", "C1", "C1", "P1", "P2", "C2", "C2", "C2"], result
|
||||
|
|
Loading…
Reference in a new issue