diff options
Diffstat (limited to 'test/resolv/test_mdns.rb')
-rw-r--r-- | test/resolv/test_mdns.rb | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/test/resolv/test_mdns.rb b/test/resolv/test_mdns.rb index eea10296c4..8e401883f1 100644 --- a/test/resolv/test_mdns.rb +++ b/test/resolv/test_mdns.rb @@ -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 |