test/socket/test_basicsocket: handle :wait_readable on read_nonblock
On some systems with slower local sockets, :wait_readable may happen and we should wait on it to drain the socket. This is a possible fix for https://bugs.ruby-lang.org/issues/13491 * test/socket/test_basicsocket.rb (test_read_write_nonblock): handle :wait_readable on read_nonblock git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
581c447ff9
commit
e79ecc540f
@ -193,6 +193,9 @@ class TestSocket_BasicSocket < Test::Unit::TestCase
|
||||
next
|
||||
when nil
|
||||
break
|
||||
when :wait_readable
|
||||
IO.select([ssock], nil, nil, 10) or
|
||||
flunk 'socket did not become readable'
|
||||
else
|
||||
flunk "unexpected read_nonblock return: #{r.inspect}"
|
||||
end while true
|
||||
|
Loading…
x
Reference in New Issue
Block a user