changeset 25975:80a1b7aa96d8

8054118: java/net/ipv6tests/UdpTest.java failed intermittently Summary: ignore the Teredo interface on windows test machines Reviewed-by: chegar
author msheppar
date Mon, 11 Aug 2014 15:34:24 +0100
parents 850dc36ea410
children 4de01a56e3ee 08086237d60e
files jdk/test/java/net/ipv6tests/Tests.java
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/test/java/net/ipv6tests/Tests.java	Mon Aug 11 11:11:55 2014 +0800
+++ b/jdk/test/java/net/ipv6tests/Tests.java	Mon Aug 11 15:34:24 2014 +0100
@@ -26,6 +26,9 @@
 import java.util.*;
 
 public class Tests {
+
+    static boolean isWindows = System.getProperty("os.name").startsWith("Windows");
+
     /**
      * performs a simple exchange of data between the two sockets
      * and throws an exception if there is any problem.
@@ -264,6 +267,12 @@
             if (ifs != null) {
                 while (ifs.hasMoreElements()) {
                     NetworkInterface nic = (NetworkInterface)ifs.nextElement();
+                    // Skip (Windows)Teredo Tunneling Pseudo-Interface
+                    if (isWindows) {
+                        String dName = nic.getDisplayName();
+                        if (dName != null && dName.contains("Teredo"))
+                            continue;
+                    }
                     try {
                         if (nic.isUp() && !nic.isLoopback())
                             return nic;