Skip to content

Commit 104a262

Browse files
author
Alex Menkov
committed
8224775: test/jdk/com/sun/jdi/JdwpListenTest.java failed to attach
Reviewed-by: sspitsyn, dfuchs
1 parent 2848938 commit 104a262

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

test/lib/jdk/test/lib/Utils.java

+14-11
Original file line numberDiff line numberDiff line change
@@ -360,17 +360,20 @@ public static List<InetAddress> getAddressesWithSymbolicAndNumericScopes() {
360360
// which are incompatible with native Windows routines.
361361
// So on Windows test only addresses with numeric scope.
362362
// On other platforms test both symbolic and numeric scopes.
363-
conf.ip6Addresses().forEach(addr6 -> {
364-
try {
365-
result.add(Inet6Address.getByAddress(null, addr6.getAddress(), addr6.getScopeId()));
366-
} catch (UnknownHostException e) {
367-
// cannot happen!
368-
throw new RuntimeException("Unexpected", e);
369-
}
370-
if (!Platform.isWindows()) {
371-
result.add(addr6);
372-
}
373-
});
363+
conf.ip6Addresses()
364+
// test only IPv6 loopback and link-local addresses (JDK-8224775)
365+
.filter(addr -> addr.isLinkLocalAddress() || addr.isLoopbackAddress())
366+
.forEach(addr6 -> {
367+
try {
368+
result.add(Inet6Address.getByAddress(null, addr6.getAddress(), addr6.getScopeId()));
369+
} catch (UnknownHostException e) {
370+
// cannot happen!
371+
throw new RuntimeException("Unexpected", e);
372+
}
373+
if (!Platform.isWindows()) {
374+
result.add(addr6);
375+
}
376+
});
374377
} catch (IOException e) {
375378
// cannot happen!
376379
throw new RuntimeException("Unexpected", e);

0 commit comments

Comments
 (0)