1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Handle Errno::EADDRNOTAVAIL with Raspberry Pi environment.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
hsbt 2017-10-21 16:05:01 +00:00
parent 6caa91ede2
commit 111a2de495

View file

@ -7,12 +7,16 @@ class TestResolvMDNS < Test::Unit::TestCase
end
def test_mdns_each_address
mdns = Resolv::MDNS.new
mdns.each_resource '_http._tcp.local', Resolv::DNS::Resource::IN::PTR do |r|
srv = mdns.getresource r.name, Resolv::DNS::Resource::IN::SRV
mdns.each_address(srv.target) do |result|
assert_not_nil(result)
begin
mdns = Resolv::MDNS.new
mdns.each_resource '_http._tcp.local', Resolv::DNS::Resource::IN::PTR do |r|
srv = mdns.getresource r.name, Resolv::DNS::Resource::IN::SRV
mdns.each_address(srv.target) do |result|
assert_not_nil(result)
end
end
rescue Errno::EADDRNOTAVAIL
# Handle Raspberry Pi environment.
end
end
end