diff options
Diffstat (limited to 'test/io/wait/test_io_wait.rb')
-rw-r--r-- | test/io/wait/test_io_wait.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/io/wait/test_io_wait.rb b/test/io/wait/test_io_wait.rb index 876fbb87de..a35caaa24a 100644 --- a/test/io/wait/test_io_wait.rb +++ b/test/io/wait/test_io_wait.rb @@ -24,6 +24,7 @@ class TestIOWait < Test::Unit::TestCase def test_nread assert_equal 0, @r.nread @w.syswrite "." + sleep 0.1 assert_equal 1, @r.nread end @@ -34,9 +35,10 @@ class TestIOWait < Test::Unit::TestCase end def test_ready? - refute @r.ready? + refute @r.ready?, "shouldn't ready, but ready" @w.syswrite "." - assert @r.ready? + sleep 0.1 + assert @r.ready?, "should ready, but not" end def test_buffered_ready? @@ -48,6 +50,7 @@ class TestIOWait < Test::Unit::TestCase def test_wait assert_nil @r.wait(0) @w.syswrite "." + sleep 0.1 assert_equal @r, @r.wait(0) end |