changeset 17080:fa4bdd8f0eed

8158270: MulticastSendReceiveTests.java failed with "Expected message not received" Reviewed-by: alanb
author chegar
date Tue, 25 Apr 2017 14:46:43 +0100
parents 7828aedcb525
children 10eb52093bb8
files test/java/nio/channels/DatagramChannel/NetworkConfiguration.java
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/test/java/nio/channels/DatagramChannel/NetworkConfiguration.java	Mon Apr 24 13:43:34 2017 +0800
+++ b/test/java/nio/channels/DatagramChannel/NetworkConfiguration.java	Tue Apr 25 14:46:43 2017 +0100
@@ -57,6 +57,9 @@
         return ip6Interfaces.get(nif);
     }
 
+    private static final boolean isMacOs =
+            System.getProperty("os.name").equals("Mac OS X");
+
     static NetworkConfiguration probe() throws IOException {
         Map<NetworkInterface,List<InetAddress>> ip4Interfaces =
             new HashMap<NetworkInterface,List<InetAddress>>();
@@ -68,7 +71,8 @@
             .list(NetworkInterface.getNetworkInterfaces());
         for (NetworkInterface nif: nifs) {
             // ignore intertaces that are down or don't support multicast
-            if (!nif.isUp() || !nif.supportsMulticast() || nif.isLoopback())
+            if (!nif.isUp() || !nif.supportsMulticast() || nif.isLoopback()
+                || (isMacOs && nif.getName().contains("awdl")))
                 continue;
 
             List<InetAddress> addrs = Collections.list(nif.getInetAddresses());