8158270: MulticastSendReceiveTests.java failed with "Expected message not received"
Reviewed-by: alanb
--- 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());