diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-31 03:54:58 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-05-31 03:54:58 +0000 |
commit | 69dcd16351786a75982bbeeed6a4b468e702339d (patch) | |
tree | c71859f2b119436dc5f65d2b5aa51b88771f66d8 /test/io/wait | |
parent | c5324d7ed6323fa86d083cf87847452c4aa4178a (diff) | |
download | ruby-69dcd16351786a75982bbeeed6a4b468e702339d.tar.gz |
* test/io/wait/test_io_wait.rb (TestIOWait#{test_nread,test_ready?,
test_wait}: give system some time to process the written data.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/io/wait')
-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 |