Skip to content

Commit

Permalink
8230132: java/net/NetworkInterface/NetworkInterfaceRetrievalTests.jav…
Browse files Browse the repository at this point in the history
…a to skip Teredo Tunneling Pseudo-Interface

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

Backport-of: 1f87cb0
  • Loading branch information
GoeLin committed Jun 20, 2023
1 parent 64c9026 commit ade9973
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@

/**
* @test
* @library /test/lib
* @bug 8179559
*/

import java.net.InetAddress;
import java.net.NetworkInterface;
import java.util.Enumeration;
import jdk.test.lib.Platform;

public class NetworkInterfaceRetrievalTests {
public static void main(String[] args) throws Exception {
Expand All @@ -39,6 +41,12 @@ public static void main(String[] args) throws Exception {
.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 + " #############");
Expand Down

1 comment on commit ade9973

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.