зеркало из https://github.com/github/ruby.git
Guard spec failing on Solaris
* https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11x/ruby-trunk/log/20180817T182406Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
fb01ef38a1
Коммит
a2d2a55d0c
|
@ -16,37 +16,39 @@ describe "Socket#connect_nonblock" do
|
|||
@thread.join if @thread
|
||||
end
|
||||
|
||||
it "connects the socket to the remote side" do
|
||||
port = nil
|
||||
accept = false
|
||||
@thread = Thread.new do
|
||||
server = TCPServer.new(@hostname, 0)
|
||||
port = server.addr[1]
|
||||
Thread.pass until accept
|
||||
conn = server.accept
|
||||
conn << "hello!"
|
||||
conn.close
|
||||
server.close
|
||||
platform_is_not :solaris do
|
||||
it "connects the socket to the remote side" do
|
||||
port = nil
|
||||
accept = false
|
||||
@thread = Thread.new do
|
||||
server = TCPServer.new(@hostname, 0)
|
||||
port = server.addr[1]
|
||||
Thread.pass until accept
|
||||
conn = server.accept
|
||||
conn << "hello!"
|
||||
conn.close
|
||||
server.close
|
||||
end
|
||||
|
||||
Thread.pass until port
|
||||
|
||||
addr = Socket.sockaddr_in(port, @hostname)
|
||||
begin
|
||||
@socket.connect_nonblock(addr)
|
||||
rescue Errno::EINPROGRESS
|
||||
end
|
||||
|
||||
accept = true
|
||||
IO.select nil, [@socket]
|
||||
|
||||
begin
|
||||
@socket.connect_nonblock(addr)
|
||||
rescue Errno::EISCONN
|
||||
# Not all OS's use this errno, so we trap and ignore it
|
||||
end
|
||||
|
||||
@socket.read(6).should == "hello!"
|
||||
end
|
||||
|
||||
Thread.pass until port
|
||||
|
||||
addr = Socket.sockaddr_in(port, @hostname)
|
||||
begin
|
||||
@socket.connect_nonblock(addr)
|
||||
rescue Errno::EINPROGRESS
|
||||
end
|
||||
|
||||
accept = true
|
||||
IO.select nil, [@socket]
|
||||
|
||||
begin
|
||||
@socket.connect_nonblock(addr)
|
||||
rescue Errno::EISCONN
|
||||
# Not all OS's use this errno, so we trap and ignore it
|
||||
end
|
||||
|
||||
@socket.read(6).should == "hello!"
|
||||
end
|
||||
|
||||
platform_is_not :freebsd, :solaris, :aix do
|
||||
|
|
Загрузка…
Ссылка в новой задаче