ruby-changes:46323
From: normal <ko1@a...>
Date: Sat, 22 Apr 2017 05:39:02 +0900 (JST)
Subject: [ruby-changes:46323] normal:r58437 (trunk): test/socket/test_basicsocket: handle :wait_readable on read_nonblock
normal 2017-04-22 05:38:58 +0900 (Sat, 22 Apr 2017) New Revision: 58437 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=58437 Log: 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 Modified files: trunk/test/socket/test_basicsocket.rb Index: test/socket/test_basicsocket.rb =================================================================== --- test/socket/test_basicsocket.rb (revision 58436) +++ test/socket/test_basicsocket.rb (revision 58437) @@ -193,6 +193,9 @@ class TestSocket_BasicSocket < Test::Uni https://github.com/ruby/ruby/blob/trunk/test/socket/test_basicsocket.rb#L193 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/