diff options
author | Neil Fuller <nfuller@google.com> | 2015-02-19 14:13:36 +0000 |
---|---|---|
committer | Neil Fuller <nfuller@google.com> | 2015-02-19 14:13:36 +0000 |
commit | f6e066e95859d3366a24da89736f487d980854ce (patch) | |
tree | 91f1ed972569a76c0ad807caf15ff7bbf39ac0a7 /harmony-tests/src/test | |
parent | db4499e1983c9649c8de7697d10825028fd8094d (diff) | |
download | libcore-f6e066e95859d3366a24da89736f487d980854ce.zip libcore-f6e066e95859d3366a24da89736f487d980854ce.tar.gz libcore-f6e066e95859d3366a24da89736f487d980854ce.tar.bz2 |
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/src/test')
-rw-r--r-- | harmony-tests/src/test/java/org/apache/harmony/tests/java/net/MulticastSocketTest.java | 2 |
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 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 = |