1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
usa 2011-05-31 03:54:58 +00:00
parent c5324d7ed6
commit 69dcd16351
2 changed files with 10 additions and 2 deletions

View file

@ -1,3 +1,8 @@
Tue May 31 12:53:10 2011 NAKAMURA Usaku <usa@ruby-lang.org>
* test/io/wait/test_io_wait.rb (TestIOWait#{test_nread,test_ready?,
test_wait}: give system some time to process the written data.
Tue May 31 12:40:49 2011 NAKAMURA Usaku <usa@ruby-lang.org>
* test/ruby/test_io.rb (TestIO#test_open_mode): MUST release resources

View file

@ -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