summaryrefslogtreecommitdiffstats
path: root/harmony-tests
diff options
context:
space:
mode:
authorNeil Fuller <nfuller@google.com>2015-02-19 14:13:36 +0000
committerNeil Fuller <nfuller@google.com>2015-02-19 14:13:36 +0000
commitf6e066e95859d3366a24da89736f487d980854ce (patch)
tree91f1ed972569a76c0ad807caf15ff7bbf39ac0a7 /harmony-tests
parentdb4499e1983c9649c8de7697d10825028fd8094d (diff)
downloadlibcore-f6e066e95859d3366a24da89736f487d980854ce.tar.gz
libcore-f6e066e95859d3366a24da89736f487d980854ce.tar.bz2
libcore-f6e066e95859d3366a24da89736f487d980854ce.zip
Fix for MulticastSocketTest for non-multicast interfaces
test_setNetworkInterfaceLjava_net_NetworkInterface does not check that the interface supports multicast. Bug: 19232216 Change-Id: I755287c06c99f36d209a3a8d11b2c75fccfa630b
Diffstat (limited to 'harmony-tests')
-rw-r--r--harmony-tests/src/test/java/org/apache/harmony/tests/java/net/MulticastSocketTest.java2
1 files changed, 1 insertions, 1 deletions
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 e3e1207bc..07e298177 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 =