8022212: Intermittent test failures in java/net
authortyan
Thu, 21 Nov 2013 13:42:54 +0000
changeset 21835 fd8f09f915da
parent 21834 2ed7771ef949
child 21836 e41f1922c8a7
8022212: Intermittent test failures in java/net Reviewed-by: chegar
jdk/test/java/net/NetworkInterface/IndexTest.java
--- a/jdk/test/java/net/NetworkInterface/IndexTest.java	Thu Nov 21 13:37:11 2013 +0000
+++ b/jdk/test/java/net/NetworkInterface/IndexTest.java	Thu Nov 21 13:42:54 2013 +0000
@@ -33,11 +33,16 @@
 import static java.lang.System.out;
 
 public class IndexTest {
+    static final boolean isWindows = System.getProperty("os.name").startsWith("Windows");
+
     public static void main(String[] args) throws Exception {
         Enumeration<NetworkInterface> netifs = NetworkInterface.getNetworkInterfaces();
-        NetworkInterface nif = null;
+        NetworkInterface nif;
         while (netifs.hasMoreElements()) {
             nif = netifs.nextElement();
+            // JDK-8022212, Skip (Windows) Teredo Tunneling seudo-Interface
+            if (nif.getDisplayName().contains("Teredo") && isWindows)
+                continue;
             int index = nif.getIndex();
             if (index >= 0) {
                 NetworkInterface nif2 = NetworkInterface.getByIndex(index);