summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/io/wait/test_io_wait.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/io/wait/test_io_wait.rb b/test/io/wait/test_io_wait.rb
index 7729d45..60886e0 100644
--- a/test/io/wait/test_io_wait.rb
+++ b/test/io/wait/test_io_wait.rb
@@ -70,7 +70,9 @@ class TestIOWait < Test::Unit::TestCase
def test_wait_eof
th = Thread.new { sleep 0.01; @w.close }
- assert_nil @r.wait
+ assert_nothing_raised(Timeout::Error) do
+ Timeout.timeout(0.1) {@r.wait}
+ end
ensure
th.join
end