8230132: java/net/NetworkInterface/NetworkInterfaceRetrievalTests.java to skip Teredo Tunneling Pseudo-Interface

The test is updated to skip Teredo pseudo interfaces on windows.

Reviewed-by: michaelm, vtewari, aefimov
This commit is contained in:
Patrick Concannon 2019-09-09 16:13:43 +01:00 committed by Daniel Fuchs
parent 032819ee9d
commit 1f87cb017f

View File

@ -24,6 +24,7 @@
/**
* @test
* @bug 8179559 8225239
* @library /test/lib
* @modules java.base/java.net:open
*/
@ -31,6 +32,7 @@ import java.net.InetAddress;
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 @@ public class NetworkInterfaceRetrievalTests {
.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 + " #############");