зеркало из https://github.com/github/ruby.git
[ruby/timeout] test that yield is given number of seconds
https://github.com/ruby/timeout/commit/ec5a614334
This commit is contained in:
Родитель
a60bf6f9bf
Коммит
1147136b8a
|
@ -10,6 +10,10 @@ class TestTimeout < Test::Unit::TestCase
|
|||
end
|
||||
end
|
||||
|
||||
def test_yield_param
|
||||
assert_equal [5, :ok], Timeout.timeout(5){|s| [s, :ok] }
|
||||
end
|
||||
|
||||
def test_queue
|
||||
q = Thread::Queue.new
|
||||
assert_raise(Timeout::Error, "[ruby-dev:32935]") {
|
||||
|
|
Загрузка…
Ссылка в новой задаче