ruby-changes:52009
From: nobu <ko1@a...>
Date: Wed, 8 Aug 2018 11:56:09 +0900 (JST)
Subject: [ruby-changes:52009] nobu:r64224 (trunk): skip hanging-up tests on macOS
nobu 2018-08-08 11:56:04 +0900 (Wed, 08 Aug 2018) New Revision: 64224 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64224 Log: skip hanging-up tests on macOS Modified files: trunk/spec/ruby/library/socket/basicsocket/send_spec.rb trunk/spec/ruby/library/socket/socket/accept_spec.rb trunk/spec/ruby/library/socket/socket/connect_spec.rb trunk/spec/ruby/library/socket/socket/sysaccept_spec.rb Index: spec/ruby/library/socket/socket/accept_spec.rb =================================================================== --- spec/ruby/library/socket/socket/accept_spec.rb (revision 64223) +++ spec/ruby/library/socket/socket/accept_spec.rb (revision 64224) @@ -12,7 +12,7 @@ describe 'Socket#accept' do https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/socket/socket/accept_spec.rb#L12 @server.close unless @server.closed? end - platform_is_not :freebsd, :windows do # hangs + platform_is_not :darwin, :freebsd, :windows do # hangs describe 'using an unbound socket' do it 'raises Errno::EINVAL' do lambda { @server.accept }.should raise_error(Errno::EINVAL) Index: spec/ruby/library/socket/socket/connect_spec.rb =================================================================== --- spec/ruby/library/socket/socket/connect_spec.rb (revision 64223) +++ spec/ruby/library/socket/socket/connect_spec.rb (revision 64224) @@ -37,11 +37,13 @@ describe 'Socket#connect' do https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/socket/socket/connect_spec.rb#L37 }.should raise_error(Errno::EISCONN) end - it 'raises Errno::ECONNREFUSED or Errno::ETIMEDOUT when the connection failed' do - begin - @client.connect(@server.getsockname) - rescue => e - [Errno::ECONNREFUSED, Errno::ETIMEDOUT].include?(e.class).should == true + platform_is_not :darwin do + it 'raises Errno::ECONNREFUSED or Errno::ETIMEDOUT when the connection failed' do + begin + @client.connect(@server.getsockname) + rescue => e + [Errno::ECONNREFUSED, Errno::ETIMEDOUT].include?(e.class).should == true + end end end end Index: spec/ruby/library/socket/socket/sysaccept_spec.rb =================================================================== --- spec/ruby/library/socket/socket/sysaccept_spec.rb (revision 64223) +++ spec/ruby/library/socket/socket/sysaccept_spec.rb (revision 64224) @@ -12,7 +12,7 @@ describe 'Socket#sysaccept' do https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/socket/socket/sysaccept_spec.rb#L12 @server.close end - platform_is_not :freebsd, :windows do # hangs + platform_is_not :freebsd, :windows, :darwin do # hangs describe 'using an unbound socket' do it 'raises Errno::EINVAL' do lambda { @server.sysaccept }.should raise_error(Errno::EINVAL) Index: spec/ruby/library/socket/basicsocket/send_spec.rb =================================================================== --- spec/ruby/library/socket/basicsocket/send_spec.rb (revision 64223) +++ spec/ruby/library/socket/basicsocket/send_spec.rb (revision 64224) @@ -177,7 +177,7 @@ describe 'BasicSocket#send' do https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/socket/basicsocket/send_spec.rb#L177 end end - platform_is_not :windows do + platform_is_not :darwin, :windows do describe 'using a connected TCP socket' do before do @client = Socket.new(family, :STREAM) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/