changeset 8875:ed979f9b40cd

8022212: Intermittent test failures in java/net Reviewed-by: chegar
author tyan
date Thu, 21 Nov 2013 13:42:54 +0000
parents 2972241cf7eb
children 89fccc5a7469
files test/java/net/NetworkInterface/IndexTest.java
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/test/java/net/NetworkInterface/IndexTest.java	Thu Nov 21 13:37:11 2013 +0000
+++ b/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);