зеркало из https://github.com/github/ruby.git
add timeout
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
f8a38a36eb
Коммит
91dfb379ea
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче