summaryrefslogtreecommitdiff
path: root/test/test_timeout.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-07 15:32:07 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-07 15:32:07 +0000
commit05e52bf46bfcbfb288ef841008358e04e58ceab4 (patch)
treee8ec404ffe5a6fe44dad14b4cd82f0502c8492d2 /test/test_timeout.rb
parentcc3350f118d60fe5ccd254cbe3e6b5e6e0ee3916 (diff)
add tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/test_timeout.rb')
-rw-r--r--test/test_timeout.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/test_timeout.rb b/test/test_timeout.rb
new file mode 100644
index 0000000..dfa863b
--- /dev/null
+++ b/test/test_timeout.rb
@@ -0,0 +1,13 @@
+require 'test/unit'
+require 'timeout'
+require 'thread'
+
+class TestTimeout < Test::Unit::TestCase
+ def test_queue
+ q = Queue.new
+ assert_raise(Timeout::Error, "[ruby-dev:32935]") {
+ timeout(0.1) { q.pop }
+ }
+ end
+end
+