8220673: Add test library support for determining platform IP support

Reviewed-by: dfuchs, chegar
This commit is contained in:
Arthur Eubanks 2019-04-16 13:06:23 -07:00 committed by Arthur Eubanks
parent c709e1cbf0
commit 0bb6328356
57 changed files with 461 additions and 75 deletions

View file

@ -24,12 +24,13 @@
/* @test
* @bug 8081678 8131155
* @summary Tests for stream returning methods
* @library /lib/testlibrary/bootlib
* @library /lib/testlibrary/bootlib /test/lib
* @build java.base/java.util.stream.OpTestCase
* @run testng/othervm NetworkInterfaceStreamTest
* @run testng/othervm -Djava.net.preferIPv4Stack=true NetworkInterfaceStreamTest
*/
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import java.net.InetAddress;
@ -43,10 +44,17 @@ import java.util.stream.OpTestCase;
import java.util.stream.Stream;
import java.util.stream.TestData;
import jdk.test.lib.net.IPSupport;
public class NetworkInterfaceStreamTest extends OpTestCase {
private final static boolean IS_WINDOWS = System.getProperty("os.name").startsWith("Windows");
@BeforeTest
void setup() {
IPSupport.skipIfCurrentConfigurationIsInvalid();
}
@Test
public void testNetworkInterfaces() throws SocketException {
Supplier<Stream<NetworkInterface>> ss = () -> {