diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-12-30 00:46:02 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-12-30 00:46:02 +0000 |
commit | 230fe41825b45c92cf73e7c8d62f4941dae7beb9 (patch) | |
tree | 58a9d33e25d189cc97de49f86d3491b0685ad2d1 | |
parent | 7f54f1b5543b4a3267a64c47cff9127cbcafcc42 (diff) | |
download | ruby-230fe41825b45c92cf73e7c8d62f4941dae7beb9.tar.gz |
accept_nonblock_spec: IO.select instead of sleep
Waiting on socket I/O using IO.select should work on all platforms.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | spec/ruby/library/socket/tcpserver/accept_nonblock_spec.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/ruby/library/socket/tcpserver/accept_nonblock_spec.rb b/spec/ruby/library/socket/tcpserver/accept_nonblock_spec.rb index cda98d8424..321a7f014b 100644 --- a/spec/ruby/library/socket/tcpserver/accept_nonblock_spec.rb +++ b/spec/ruby/library/socket/tcpserver/accept_nonblock_spec.rb @@ -18,7 +18,7 @@ describe "Socket::TCPServer.accept_nonblock" do }.should raise_error(IO::WaitReadable) c = TCPSocket.new("127.0.0.1", @port) - sleep 0.1 + IO.select([@server]) s = @server.accept_nonblock port, address = Socket.unpack_sockaddr_in(s.getsockname) |