diff options
Diffstat (limited to 'test/ruby/test_thread_cv.rb')
| -rw-r--r-- | test/ruby/test_thread_cv.rb | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/test/ruby/test_thread_cv.rb b/test/ruby/test_thread_cv.rb index 812c4221bc..81201f134f 100644 --- a/test/ruby/test_thread_cv.rb +++ b/test/ruby/test_thread_cv.rb @@ -6,12 +6,6 @@ class TestThreadConditionVariable < Test::Unit::TestCase ConditionVariable = Thread::ConditionVariable Mutex = Thread::Mutex - def test_initialized - assert_raise(TypeError) { - ConditionVariable.allocate.wait(nil) - } - end - def test_condvar_signal_and_wait mutex = Thread::Mutex.new condvar = Thread::ConditionVariable.new @@ -82,13 +76,16 @@ class TestThreadConditionVariable < Test::Unit::TestCase condvar.broadcast result << "P2" end - Timeout.timeout(5) do + Timeout.timeout(60) do nr_threads.times do |i| threads[i].join end end assert_equal ["C1", "C1", "C1", "P1", "P2", "C2", "C2", "C2"], result + ensure + threads.each(&:kill) + threads.each(&:join) end def test_condvar_wait_deadlock |
