diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-04-21 20:38:58 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-04-21 20:38:58 +0000 |
commit | e79ecc540f267b338056414b85edeb4a10e8ab4c (patch) | |
tree | 5bccc699ece155112cfcba6d3012a77b0a60d24b /test/socket | |
parent | 581c447ff93bdd8576e8532bc68891659a78d44e (diff) |
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
Diffstat (limited to 'test/socket')
-rw-r--r-- | test/socket/test_basicsocket.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/socket/test_basicsocket.rb b/test/socket/test_basicsocket.rb index 0b13a7f1af..4d11521e9e 100644 --- a/test/socket/test_basicsocket.rb +++ b/test/socket/test_basicsocket.rb @@ -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 |