changeset 23045:949bd9e35147

8035633: TEST_BUG: java/net/NetworkInterface/Equals.java and some tests failed on windows intermittently Reviewed-by: chegar, alanb, igerasim
author ewang
date Mon, 03 Mar 2014 11:06:38 +0000
parents 14d277dbc8e0
children 0b0407b1e2a5
files jdk/test/java/net/MulticastSocket/TestInterfaces.java jdk/test/java/net/NetworkInterface/Equals.java jdk/test/java/net/NetworkInterface/IndexTest.java
diffstat 3 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/test/java/net/MulticastSocket/TestInterfaces.java	Mon Mar 03 10:55:31 2014 +0800
+++ b/jdk/test/java/net/MulticastSocket/TestInterfaces.java	Mon Mar 03 11:06:38 2014 +0000
@@ -87,8 +87,9 @@
                 continue;
             }
 
-            // JDK-8022963, Skip (Windows) Teredo Tunneling seudo-Interface
-            if (isWindows && ni.getDisplayName().contains("Teredo"))
+            // JDK-8022963, Skip (Windows) Teredo Tunneling Pseudo-Interface
+            String dName = ni.getDisplayName();
+            if (isWindows && dName != null && dName.contains("Teredo"))
                 continue;
 
             NetworkInterface curr = soc.getNetworkInterface();
--- a/jdk/test/java/net/NetworkInterface/Equals.java	Mon Mar 03 10:55:31 2014 +0800
+++ b/jdk/test/java/net/NetworkInterface/Equals.java	Mon Mar 03 11:06:38 2014 +0000
@@ -62,8 +62,9 @@
         while (nifs2.hasMoreElements()) {
             NetworkInterface ni = nifs2.nextElement();
 
-            // JDK-8022963, Skip (Windows)Teredo Tunneling seudo-Interface
-            if (isWindows && ni.getDisplayName().contains("Teredo"))
+            // JDK-8022963, Skip (Windows)Teredo Tunneling Pseudo-Interface
+            String dName = ni.getDisplayName();
+            if (isWindows && dName != null && dName.contains("Teredo"))
                 continue;
 
             NetworkInterface niOrig = nicMap.get(ni.getName());
--- a/jdk/test/java/net/NetworkInterface/IndexTest.java	Mon Mar 03 10:55:31 2014 +0800
+++ b/jdk/test/java/net/NetworkInterface/IndexTest.java	Mon Mar 03 11:06:38 2014 +0000
@@ -40,8 +40,9 @@
         NetworkInterface nif;
         while (netifs.hasMoreElements()) {
             nif = netifs.nextElement();
-            // JDK-8022212, Skip (Windows) Teredo Tunneling seudo-Interface
-            if (nif.getDisplayName().contains("Teredo") && isWindows)
+            // JDK-8022212, Skip (Windows) Teredo Tunneling Pseudo-Interface
+            String dName = nif.getDisplayName();
+            if (isWindows && dName != null && dName.contains("Teredo"))
                 continue;
             int index = nif.getIndex();
             if (index >= 0) {