mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/timeout] test for basic functionality
https://github.com/ruby/timeout/commit/1c6bb90aea
This commit is contained in:
parent
00cfafc0f5
commit
582602d142
1 changed files with 7 additions and 0 deletions
|
@ -3,6 +3,13 @@ require 'test/unit'
|
|||
require 'timeout'
|
||||
|
||||
class TestTimeout < Test::Unit::TestCase
|
||||
|
||||
def test_non_timing_out_code_is_successful
|
||||
assert_nothing_raised do
|
||||
assert_equal :ok, Timeout.timeout(1){ :ok }
|
||||
end
|
||||
end
|
||||
|
||||
def test_queue
|
||||
q = Thread::Queue.new
|
||||
assert_raise(Timeout::Error, "[ruby-dev:32935]") {
|
||||
|
|
Loading…
Reference in a new issue