timeout(0) -> never timeout (compatible to Timeout)
This commit is contained in:
parent
0a0f47650e
commit
9f993da845
2 changed files with 18 additions and 7 deletions
|
@ -152,4 +152,11 @@ class TestRubyTimeoutInterrupt < Test::Unit::TestCase
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
should "not timeout, if timeout is 0" do
|
||||
assert_nothing_raised TimeoutInterrupt::Error, "Unexpected Timed out." do
|
||||
# should never timeout (we can not wait infinity seconds, so only 5)
|
||||
TimeoutInterrupt.timeout( 0) { sleep 5 }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue