ruby-changes:55902
From: Takashi <ko1@a...>
Date: Wed, 29 May 2019 14:57:50 +0900 (JST)
Subject: [ruby-changes:55902] Takashi Kokubun: 5379ca9250 (trunk): Skip spec broken since a66bc2c01194a9c017c874a30db5b3b6bd95e966
https://git.ruby-lang.org/ruby.git/commit/?id=5379ca9250 From 5379ca92501c529005c0818f3cbbd1ef0798de6d Mon Sep 17 00:00:00 2001 From: Takashi Kokubun <takashikkbn@g...> Date: Wed, 29 May 2019 14:56:58 +0900 Subject: Skip spec broken since a66bc2c01194a9c017c874a30db5b3b6bd95e966 This has not worked since the merge https://travis-ci.org/ruby/ruby/jobs/538438184 diff --git a/spec/ruby/library/socket/socket/tcp_server_loop_spec.rb b/spec/ruby/library/socket/socket/tcp_server_loop_spec.rb index 15865a0..603e7b3 100644 --- a/spec/ruby/library/socket/socket/tcp_server_loop_spec.rb +++ b/spec/ruby/library/socket/socket/tcp_server_loop_spec.rb @@ -19,34 +19,38 @@ describe 'Socket.tcp_server_loop' do https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/socket/socket/tcp_server_loop_spec.rb#L19 @client.close end - it 'yields a Socket and an Addrinfo' do - @sock, addr = nil - - thread = Thread.new do - Socket.tcp_server_loop('127.0.0.1', @port) do |socket, addrinfo| - @sock = socket - addr = addrinfo - - break + # Not working since ruby/ruby a66bc2c01194a9c017c874a30db5b3b6bd95e966 + # https://travis-ci.org/ruby/ruby/jobs/538438184 + platform_is_not :darwin do + it 'yields a Socket and an Addrinfo' do + @sock, addr = nil + + thread = Thread.new do + Socket.tcp_server_loop('127.0.0.1', @port) do |socket, addrinfo| + @sock = socket + addr = addrinfo + + break + end end - end - SocketSpecs.loop_with_timeout do - begin - @client.connect(Socket.sockaddr_in(@port, '127.0.0.1')) - rescue SystemCallError - sleep 0.01 - :retry + SocketSpecs.loop_with_timeout do + begin + @client.connect(Socket.sockaddr_in(@port, '127.0.0.1')) + rescue SystemCallError + sleep 0.01 + :retry + end end - end - # At this point the connection has been set up but the thread may not yet - # have returned, thus we'll need to wait a little longer for it to - # complete. - thread.join(2) + # At this point the connection has been set up but the thread may not yet + # have returned, thus we'll need to wait a little longer for it to + # complete. + thread.join(2) - @sock.should be_an_instance_of(Socket) - addr.should be_an_instance_of(Addrinfo) + @sock.should be_an_instance_of(Socket) + addr.should be_an_instance_of(Addrinfo) + end end end end -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/