8230132: java/net/NetworkInterface/NetworkInterfaceRetrievalTests.java to skip Teredo Tunneling Pseudo-Interface
authordfuchs
Mon, 09 Sep 2019 16:13:43 +0100
changeset 58052 bc4e7a84e89d
parent 58051 505e28fe1769
child 58053 1a296c9064dc
8230132: java/net/NetworkInterface/NetworkInterfaceRetrievalTests.java to skip Teredo Tunneling Pseudo-Interface Summary: The test is updated to skip Teredo pseudo interfaces on windows. Reviewed-by: michaelm, vtewari, aefimov Contributed-by: patrick.concannon@oracle.com
test/jdk/java/net/NetworkInterface/NetworkInterfaceRetrievalTests.java
--- a/test/jdk/java/net/NetworkInterface/NetworkInterfaceRetrievalTests.java	Mon Sep 09 15:42:16 2019 +0200
+++ b/test/jdk/java/net/NetworkInterface/NetworkInterfaceRetrievalTests.java	Mon Sep 09 16:13:43 2019 +0100
@@ -24,6 +24,7 @@
 /**
  * @test
  * @bug 8179559 8225239
+ * @library /test/lib
  * @modules java.base/java.net:open
  */
 
@@ -31,6 +32,7 @@
 import java.net.NetworkInterface;
 import java.util.Enumeration;
 import java.lang.reflect.Method;
+import jdk.test.lib.Platform;
 
 public class NetworkInterfaceRetrievalTests {
     public static void main(String[] args) throws Exception {
@@ -44,6 +46,12 @@
                     .getNetworkInterfaces();
             while (en.hasMoreElements()) {
                 NetworkInterface ni = en.nextElement();
+
+                //JDK-8230132: Should not test on Windows with Teredo Tunneling Pseudo-Interface
+                String dName = ni.getDisplayName();
+                if (Platform.isWindows() && dName != null && dName.contains("Teredo"))
+                    continue;
+
                 Enumeration<InetAddress> addrs = ni.getInetAddresses();
                 System.out.println("############ Checking network interface + "
                         + ni + " #############");