8154543: NetworkInterfaceStreamTest.java fails intermittently after JDK-8146758
Reviewed-by: chegar
diff --git a/jdk/test/java/net/NetworkInterface/NetworkInterfaceStreamTest.java b/jdk/test/java/net/NetworkInterface/NetworkInterfaceStreamTest.java
index 08075ac..1fa3a55 100644
--- a/jdk/test/java/net/NetworkInterface/NetworkInterfaceStreamTest.java
+++ b/jdk/test/java/net/NetworkInterface/NetworkInterfaceStreamTest.java
@@ -51,7 +51,8 @@
public void testNetworkInterfaces() throws SocketException {
Supplier<Stream<NetworkInterface>> ss = () -> {
try {
- return allNetworkInterfaces();
+ return NetworkInterface.networkInterfaces()
+ .filter(ni -> isIncluded(ni));
}
catch (SocketException e) {
throw new RuntimeException(e);