8038276: java/net/NetworkInterface/Test.java fails on Windows intermittently for Teredo Interface
authorchegar
Fri, 28 Mar 2014 16:59:19 +0000
changeset 23591 1b50db37efd3
parent 23590 ffd8b0b70511
child 23593 318e66c8de0e
8038276: java/net/NetworkInterface/Test.java fails on Windows intermittently for Teredo Interface Reviewed-by: chegar Contributed-by: Amanda Jiang <amanda.jiang@oracle.com>
jdk/test/java/net/NetworkInterface/Test.java
--- a/jdk/test/java/net/NetworkInterface/Test.java	Fri Mar 28 15:56:24 2014 +0400
+++ b/jdk/test/java/net/NetworkInterface/Test.java	Fri Mar 28 16:59:19 2014 +0000
@@ -30,6 +30,7 @@
 import java.util.Enumeration;
 
 public class Test {
+    static final boolean isWindows = System.getProperty("os.name").startsWith("Windows");
 
     public static void main(String args[]) throws Exception {
 
@@ -38,6 +39,11 @@
         while (nifs.hasMoreElements()) {
             NetworkInterface ni = (NetworkInterface)nifs.nextElement();
 
+            //JDK-8038276: Should not test on Windows with Teredo Tunneling Pseudo-Interface
+            String dName = ni.getDisplayName();
+            if (isWindows && dName != null && dName.contains("Teredo"))
+                continue;
+
             String name = ni.getName();
             System.out.println("\n" + name);