From f6e066e95859d3366a24da89736f487d980854ce Mon Sep 17 00:00:00 2001 From: Neil Fuller Date: Thu, 19 Feb 2015 14:13:36 +0000 Subject: Fix for MulticastSocketTest for non-multicast interfaces test_setNetworkInterfaceLjava_net_NetworkInterface does not check that the interface supports multicast. Bug: 19232216 Change-Id: I755287c06c99f36d209a3a8d11b2c75fccfa630b --- .../java/org/apache/harmony/tests/java/net/MulticastSocketTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'harmony-tests/src/test') diff --git a/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/MulticastSocketTest.java b/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/MulticastSocketTest.java index e3e1207..07e2981 100644 --- a/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/MulticastSocketTest.java +++ b/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/MulticastSocketTest.java @@ -601,7 +601,7 @@ public class MulticastSocketTest extends junit.framework.TestCase { Enumeration theInterfaces = NetworkInterface.getNetworkInterfaces(); while (theInterfaces.hasMoreElements()) { NetworkInterface thisInterface = (NetworkInterface) theInterfaces.nextElement(); - if (thisInterface.getInetAddresses().hasMoreElements() && thisInterface.isUp()) { + if (willWorkForMulticast(thisInterface)) { if ((!(thisInterface.getInetAddresses().nextElement()).isLoopbackAddress())) { MulticastSocket receivingSocket = createReceivingSocket(0); InetSocketAddress groupAddress = -- cgit v1.1