8158270: MulticastSendReceiveTests.java failed with "Expected message not received"
authorchegar
Tue, 25 Apr 2017 14:46:43 +0100
changeset 44839 3f4ba193e06a
parent 44789 73fd39e0702e
child 44840 2761d60c363f
8158270: MulticastSendReceiveTests.java failed with "Expected message not received" Reviewed-by: alanb
jdk/test/java/nio/channels/DatagramChannel/NetworkConfiguration.java
--- a/jdk/test/java/nio/channels/DatagramChannel/NetworkConfiguration.java	Mon Apr 24 13:43:34 2017 +0800
+++ b/jdk/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());