8154543: NetworkInterfaceStreamTest.java fails intermittently after JDK-8146758
authorxiaofeya
Wed, 20 Apr 2016 00:35:02 -0700
changeset 37588 e672a494cce9
parent 37587 032087786008
child 37589 539ae4ef21ce
8154543: NetworkInterfaceStreamTest.java fails intermittently after JDK-8146758 Reviewed-by: chegar Contributed-by: Felix Yang <felix.yang@oracle.com>
jdk/test/java/net/NetworkInterface/NetworkInterfaceStreamTest.java
--- a/jdk/test/java/net/NetworkInterface/NetworkInterfaceStreamTest.java	Tue Apr 19 18:09:58 2016 -0700
+++ b/jdk/test/java/net/NetworkInterface/NetworkInterfaceStreamTest.java	Wed Apr 20 00:35:02 2016 -0700
@@ -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);