diff --git a/test/jdk/com/sun/net/httpserver/SelCacheTest.java b/test/jdk/com/sun/net/httpserver/SelCacheTest.java index 8c644bccfa544367d797ea0129f062c347f6c6d1..9100401af27d31077375d3970b0c100c6e7814e9 100644 --- a/test/jdk/com/sun/net/httpserver/SelCacheTest.java +++ b/test/jdk/com/sun/net/httpserver/SelCacheTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2006, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,14 +24,14 @@ /** * @test * @bug 6270015 - * @library /lib/testlibrary/ - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @run main/othervm -Dsun.net.httpserver.selCacheTimeout=2 SelCacheTest * @summary Light weight HTTP server */ import com.sun.net.httpserver.*; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import java.util.*; import java.util.concurrent.*; diff --git a/test/jdk/com/sun/net/httpserver/Test1.java b/test/jdk/com/sun/net/httpserver/Test1.java index 55d278fe1ae820ee30977b345a91c5275303ad8e..f79b204f99581b27ecafa7f2f43c58f951af8891 100644 --- a/test/jdk/com/sun/net/httpserver/Test1.java +++ b/test/jdk/com/sun/net/httpserver/Test1.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,8 +24,8 @@ /** * @test * @bug 6270015 - * @library /lib/testlibrary/ - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @run main/othervm Test1 * @run main/othervm -Dsun.net.httpserver.maxReqTime=10 Test1 * @run main/othervm -Dsun.net.httpserver.nodelay=true Test1 @@ -38,7 +38,7 @@ import java.util.concurrent.*; import java.io.*; import java.net.*; import javax.net.ssl.*; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; /* basic http/s connectivity test * Tests: diff --git a/test/jdk/com/sun/net/httpserver/Test12.java b/test/jdk/com/sun/net/httpserver/Test12.java index 910ec385a9ca87a80477037ba88b53245a5f7517..dd724c267ce75005147cd8538443ce803c2b648d 100644 --- a/test/jdk/com/sun/net/httpserver/Test12.java +++ b/test/jdk/com/sun/net/httpserver/Test12.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,10 +24,10 @@ /** * @test * @bug 6270015 - * @library /lib/testlibrary/ - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @run main/othervm Test12 - * @summary Light weight HTTP server + * @summary Light weight HTTP server */ import com.sun.net.httpserver.*; @@ -36,7 +36,7 @@ import java.util.concurrent.*; import java.io.*; import java.net.*; import javax.net.ssl.*; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; /* basic http/s connectivity test * Tests: diff --git a/test/jdk/com/sun/net/httpserver/Test13.java b/test/jdk/com/sun/net/httpserver/Test13.java index 0436f8b0643fe2e2016b30564cd94e9521d944cb..6061cc0776cc84a433ffbd87ba85bdeaa1926d39 100644 --- a/test/jdk/com/sun/net/httpserver/Test13.java +++ b/test/jdk/com/sun/net/httpserver/Test13.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,10 +24,10 @@ /** * @test * @bug 6270015 - * @library /lib/testlibrary/ - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @run main/othervm Test13 - * @summary Light weight HTTP server + * @summary Light weight HTTP server */ import com.sun.net.httpserver.*; @@ -37,7 +37,7 @@ import java.util.logging.*; import java.io.*; import java.net.*; import javax.net.ssl.*; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; /* basic http/s connectivity test * Tests: diff --git a/test/jdk/com/sun/net/httpserver/Test6a.java b/test/jdk/com/sun/net/httpserver/Test6a.java index fd5a48ee7305ad6668fa454301fd582e4317562c..18b5dfe395350f28d94acf17f6c66b6b7cec5002 100644 --- a/test/jdk/com/sun/net/httpserver/Test6a.java +++ b/test/jdk/com/sun/net/httpserver/Test6a.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,10 +24,10 @@ /** * @test * @bug 6270015 - * @library /lib/testlibrary/ - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @run main/othervm Test6a - * @summary Light weight HTTP server + * @summary Light weight HTTP server */ import com.sun.net.httpserver.*; @@ -36,7 +36,7 @@ import java.util.concurrent.*; import java.io.*; import java.net.*; import javax.net.ssl.*; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; /** * Test https POST large file via chunked encoding (unusually small chunks) diff --git a/test/jdk/com/sun/net/httpserver/Test7a.java b/test/jdk/com/sun/net/httpserver/Test7a.java index 3599edf20305262a3fdab42831ff3a4cbe88be90..b170cded2aa8dfc1d407a4d66e997cd80877f6d5 100644 --- a/test/jdk/com/sun/net/httpserver/Test7a.java +++ b/test/jdk/com/sun/net/httpserver/Test7a.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,10 +24,10 @@ /** * @test * @bug 6270015 - * @library /lib/testlibrary/ - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @run main/othervm Test7a - * @summary Light weight HTTP server + * @summary Light weight HTTP server */ import com.sun.net.httpserver.*; @@ -36,7 +36,7 @@ import java.util.concurrent.*; import java.io.*; import java.net.*; import javax.net.ssl.*; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; /** * Test POST large file via chunked encoding (large chunks) diff --git a/test/jdk/com/sun/net/httpserver/Test8a.java b/test/jdk/com/sun/net/httpserver/Test8a.java index ac11931cacd5e0c2a3ca61e61cca57cf858af913..daf65e21fa7e4989d7dc1ec90dffd215eba737d1 100644 --- a/test/jdk/com/sun/net/httpserver/Test8a.java +++ b/test/jdk/com/sun/net/httpserver/Test8a.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,10 +24,10 @@ /** * @test * @bug 6270015 - * @library /lib/testlibrary/ - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @run main/othervm Test8a - * @summary Light weight HTTP server + * @summary Light weight HTTP server */ import com.sun.net.httpserver.*; @@ -36,7 +36,7 @@ import java.util.concurrent.*; import java.io.*; import java.net.*; import javax.net.ssl.*; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; /** * Test POST large file via fixed len encoding diff --git a/test/jdk/com/sun/net/httpserver/Test9.java b/test/jdk/com/sun/net/httpserver/Test9.java index 581b9e54c9f8f78a09b6b74454fc15fbd22b4114..fa0588a91fc45f8aeb5073197cf5ea4750983648 100644 --- a/test/jdk/com/sun/net/httpserver/Test9.java +++ b/test/jdk/com/sun/net/httpserver/Test9.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,10 +24,10 @@ /** * @test * @bug 6270015 - * @library /lib/testlibrary/ - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @run main/othervm Test9 - * @summary Light weight HTTP server + * @summary Light weight HTTP server */ import com.sun.net.httpserver.*; @@ -36,7 +36,7 @@ import java.util.concurrent.*; import java.io.*; import java.net.*; import javax.net.ssl.*; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; /* Same as Test1 but requests run in parallel. */ diff --git a/test/jdk/com/sun/net/httpserver/Test9a.java b/test/jdk/com/sun/net/httpserver/Test9a.java index 6fd3f16562aa4cd81622e85b29bc29de84bc09eb..ff5be52be0b347dbe7f078b58043a2f18a5d523c 100644 --- a/test/jdk/com/sun/net/httpserver/Test9a.java +++ b/test/jdk/com/sun/net/httpserver/Test9a.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,10 +24,10 @@ /** * @test * @bug 6270015 - * @library /lib/testlibrary/ - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @run main/othervm Test9a - * @summary Light weight HTTP server + * @summary Light weight HTTP server */ import com.sun.net.httpserver.*; @@ -36,7 +36,7 @@ import java.util.concurrent.*; import java.io.*; import java.net.*; import javax.net.ssl.*; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; /* Same as Test1 but requests run in parallel. */ diff --git a/test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPSetAuthenticatorTest.java b/test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPSetAuthenticatorTest.java index 144236e1f64a949bd737031f2f936a74534c7441..c916b13db4349167248393f6499edd8eb36b6ae2 100644 --- a/test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPSetAuthenticatorTest.java +++ b/test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPSetAuthenticatorTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -35,12 +35,12 @@ import java.util.stream.Stream; /* * @test * @bug 8169415 - * @library /lib/testlibrary/ + * @library /test/lib * @modules java.logging * java.base/sun.net.www * java.base/sun.net.www.protocol.http * jdk.httpserver/sun.net.httpserver - * @build jdk.testlibrary.SimpleSSLContext HTTPTest HTTPTestServer HTTPTestClient HTTPSetAuthenticatorTest + * @build jdk.test.lib.net.SimpleSSLContext HTTPTest HTTPTestServer HTTPTestClient HTTPSetAuthenticatorTest * @summary A simple HTTP test that starts an echo server supporting the given * authentication scheme, then starts a regular HTTP client to invoke it. * The client first does a GET request on "/", then follows on diff --git a/test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPTest.java b/test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPTest.java index ba7d729dc27eb09258f5dc3cf6c2f89d631ee92e..9a6cd93dd00bee5a9666795de584c9d32f43fc27 100644 --- a/test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPTest.java +++ b/test/jdk/java/net/HttpURLConnection/SetAuthenticator/HTTPTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -41,16 +41,16 @@ import javax.net.ssl.HostnameVerifier; import javax.net.ssl.HttpsURLConnection; import javax.net.ssl.SSLContext; import javax.net.ssl.SSLSession; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; /* * @test * @bug 8169415 - * @library /lib/testlibrary/ + * @library /test/lib * @modules java.logging * java.base/sun.net.www * jdk.httpserver/sun.net.httpserver - * @build jdk.testlibrary.SimpleSSLContext HTTPTest HTTPTestServer HTTPTestClient + * @build jdk.test.lib.net.SimpleSSLContext HTTPTest HTTPTestServer HTTPTestClient * @summary A simple HTTP test that starts an echo server supporting Digest * authentication, then starts a regular HTTP client to invoke it. * The client first does a GET request on "/", then follows on diff --git a/test/jdk/java/net/URLPermission/URLTest.java b/test/jdk/java/net/URLPermission/URLTest.java index 1923eb681f4b872c277bc5a3b52b99057567a751..763738db46c26a5fa99eb8d9be8a0b42125709bc 100644 --- a/test/jdk/java/net/URLPermission/URLTest.java +++ b/test/jdk/java/net/URLPermission/URLTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -26,8 +26,8 @@ import java.net.URLPermission; * @test * @bug 8010464 * @modules jdk.httpserver - * @library /lib/testlibrary/ - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @run main/othervm URLTest * @summary check URLPermission with Http(s)URLConnection */ @@ -38,7 +38,7 @@ import java.security.*; import java.util.concurrent.*; import com.sun.net.httpserver.*; import javax.net.ssl.*; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; public class URLTest { diff --git a/test/jdk/java/net/httpclient/AbstractNoBody.java b/test/jdk/java/net/httpclient/AbstractNoBody.java index afe4865d0608ba4623dfbb8aad0679eb0e3038ae..38ae9b758f62dd11a9e019539d3d9405d651fa86 100644 --- a/test/jdk/java/net/httpclient/AbstractNoBody.java +++ b/test/jdk/java/net/httpclient/AbstractNoBody.java @@ -35,7 +35,7 @@ import com.sun.net.httpserver.HttpsConfigurator; import com.sun.net.httpserver.HttpsServer; import java.net.http.HttpClient; import javax.net.ssl.SSLContext; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/AbstractThrowingPublishers.java b/test/jdk/java/net/httpclient/AbstractThrowingPublishers.java index 35d1a68f02f14270b62975d4ece403ec87700e40..38c5208cf55658263193962cfebaae480477f109 100644 --- a/test/jdk/java/net/httpclient/AbstractThrowingPublishers.java +++ b/test/jdk/java/net/httpclient/AbstractThrowingPublishers.java @@ -24,7 +24,7 @@ import com.sun.net.httpserver.HttpServer; import com.sun.net.httpserver.HttpsConfigurator; import com.sun.net.httpserver.HttpsServer; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterClass; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; diff --git a/test/jdk/java/net/httpclient/AbstractThrowingPushPromises.java b/test/jdk/java/net/httpclient/AbstractThrowingPushPromises.java index e829a617f60f893e78a2eef22836528ed5a4693e..ed324a6e5a9ebef5b9f947190f29a50570f0c6af 100644 --- a/test/jdk/java/net/httpclient/AbstractThrowingPushPromises.java +++ b/test/jdk/java/net/httpclient/AbstractThrowingPushPromises.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when push promise handlers and their * response body handlers and subscribers throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker AbstractThrowingPushPromises * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common @@ -35,7 +35,7 @@ * @run testng/othervm -Djdk.internal.httpclient.debug=true AbstractThrowingPushPromises */ -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeTest; diff --git a/test/jdk/java/net/httpclient/AbstractThrowingSubscribers.java b/test/jdk/java/net/httpclient/AbstractThrowingSubscribers.java index 6e9759086dc73cfab94bd431bd1b962f71495d9a..72ec7bb05c55c91671a3fa16ba8e491880a06f04 100644 --- a/test/jdk/java/net/httpclient/AbstractThrowingSubscribers.java +++ b/test/jdk/java/net/httpclient/AbstractThrowingSubscribers.java @@ -24,7 +24,7 @@ import com.sun.net.httpserver.HttpServer; import com.sun.net.httpserver.HttpsConfigurator; import com.sun.net.httpserver.HttpsServer; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeTest; diff --git a/test/jdk/java/net/httpclient/AsFileDownloadTest.java b/test/jdk/java/net/httpclient/AsFileDownloadTest.java index 52b5a1f90d0b0f7b77bf711ab9089e08d271f1f3..2d22a1a841f430dfd1a2a69670411f8ca1a9fac9 100644 --- a/test/jdk/java/net/httpclient/AsFileDownloadTest.java +++ b/test/jdk/java/net/httpclient/AsFileDownloadTest.java @@ -31,9 +31,9 @@ * java.net.http/jdk.internal.net.http.hpack * java.logging * jdk.httpserver - * @library /lib/testlibrary /test/lib http2/server + * @library /test/lib http2/server * @build Http2TestServer - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @build jdk.test.lib.Platform * @build jdk.test.lib.util.FileUtils * @run testng/othervm AsFileDownloadTest @@ -67,7 +67,7 @@ import java.util.List; import java.util.Locale; import java.util.Map; import javax.net.ssl.SSLContext; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import jdk.test.lib.util.FileUtils; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; diff --git a/test/jdk/java/net/httpclient/AsFileDownloadTest.policy b/test/jdk/java/net/httpclient/AsFileDownloadTest.policy index a8454c470e2c2290ee46638383af0bc7c1aa8bc7..0f38171503dd22bfa611bf1e8d0d071f3b81cc8f 100644 --- a/test/jdk/java/net/httpclient/AsFileDownloadTest.policy +++ b/test/jdk/java/net/httpclient/AsFileDownloadTest.policy @@ -21,10 +21,10 @@ // questions. // -// for JTwork/classes/0/lib/testlibrary/jdk/testlibrary/SimpleSSLContext.class -grant codeBase "file:${test.classes}/../../../../lib/testlibrary/-" { +// for JTwork/classes/0/test/lib/jdk/test/lib/net/SimpleSSLContext.class +grant codeBase "file:${test.classes}/../../../../test/lib/-" { permission java.util.PropertyPermission "test.src.path", "read"; - permission java.io.FilePermission "${test.src}/../../../lib/testlibrary/jdk/testlibrary/testkeys", "read"; + permission java.io.FilePermission "${test.src}/../../../../lib/jdk/test/lib/net/testkeys", "read"; }; // for JTwork//classes/0/java/net/httpclient/http2/server/* diff --git a/test/jdk/java/net/httpclient/BasicRedirectTest.java b/test/jdk/java/net/httpclient/BasicRedirectTest.java index f446e1bb7a68fd30241f1a56487fae48033071ed..8fb36b7454bed678f11e24aa8a649cc50f8e1bb4 100644 --- a/test/jdk/java/net/httpclient/BasicRedirectTest.java +++ b/test/jdk/java/net/httpclient/BasicRedirectTest.java @@ -30,9 +30,9 @@ * java.net.http/jdk.internal.net.http.hpack * java.logging * jdk.httpserver - * @library /lib/testlibrary /test/lib http2/server + * @library /test/lib http2/server * @build Http2TestServer - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @run testng/othervm * -Djdk.httpclient.HttpClient.log=trace,headers,requests * BasicRedirectTest @@ -53,7 +53,7 @@ import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.net.http.HttpResponse.BodyHandlers; import javax.net.ssl.SSLContext; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/CancelledResponse.java b/test/jdk/java/net/httpclient/CancelledResponse.java index 528c8991e3f54b5dff0ed43dc91fd4c10288a1b1..f69bf066ba2a210de1deee20316e40af4a4585de 100644 --- a/test/jdk/java/net/httpclient/CancelledResponse.java +++ b/test/jdk/java/net/httpclient/CancelledResponse.java @@ -26,7 +26,7 @@ import java.net.http.HttpClient.Version; import java.net.http.HttpHeaders; import java.net.http.HttpRequest; import java.net.http.HttpResponse; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import javax.net.ServerSocketFactory; import javax.net.ssl.SSLContext; @@ -55,9 +55,9 @@ import static java.nio.charset.StandardCharsets.ISO_8859_1; /** * @test * @bug 8087112 - * @library /lib/testlibrary + * @library /test/lib * @modules java.net.http/jdk.internal.net.http.common - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @build MockServer ReferenceTracker * @run main/othervm CancelledResponse * @run main/othervm CancelledResponse SSL diff --git a/test/jdk/java/net/httpclient/ConcurrentResponses.java b/test/jdk/java/net/httpclient/ConcurrentResponses.java index 2a61b17b79d64c29b89f0ec66b1a5dc390be7bfc..718a1b6aee6080e05c7db9278d9e24f5d2b39d85 100644 --- a/test/jdk/java/net/httpclient/ConcurrentResponses.java +++ b/test/jdk/java/net/httpclient/ConcurrentResponses.java @@ -32,9 +32,9 @@ * java.net.http/jdk.internal.net.http.hpack * java.logging * jdk.httpserver - * @library /lib/testlibrary http2/server + * @library /test/lib http2/server * @build Http2TestServer - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @run testng/othervm * -Djdk.httpclient.HttpClient.log=headers,errors,channel * ConcurrentResponses @@ -67,7 +67,7 @@ import java.net.http.HttpResponse.BodyHandler; import java.net.http.HttpResponse.BodyHandlers; import java.net.http.HttpResponse.BodySubscriber; import java.net.http.HttpResponse.BodySubscribers; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/CookieHeaderTest.java b/test/jdk/java/net/httpclient/CookieHeaderTest.java index 4c770ad337eb4bde90b6c9ae9dcb28da2b0c9803..f5c9b57d376628748ac3b0cb142bdd0fee8bcd02 100644 --- a/test/jdk/java/net/httpclient/CookieHeaderTest.java +++ b/test/jdk/java/net/httpclient/CookieHeaderTest.java @@ -31,9 +31,9 @@ * java.net.http/jdk.internal.net.http.hpack * java.logging * jdk.httpserver - * @library /lib/testlibrary /test/lib http2/server + * @library /test/lib http2/server * @build Http2TestServer - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @run testng/othervm * -Djdk.tls.acknowledgeCloseNotify=true * -Djdk.httpclient.HttpClient.log=trace,headers,requests @@ -43,7 +43,7 @@ import com.sun.net.httpserver.HttpServer; import com.sun.net.httpserver.HttpsConfigurator; import com.sun.net.httpserver.HttpsServer; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/CustomRequestPublisher.java b/test/jdk/java/net/httpclient/CustomRequestPublisher.java index 0aeb398b0e9307278acb864a4ab501852b12eca2..34c7f8611ace0dfc75676ed3646c0d7f4ee386d9 100644 --- a/test/jdk/java/net/httpclient/CustomRequestPublisher.java +++ b/test/jdk/java/net/httpclient/CustomRequestPublisher.java @@ -30,9 +30,9 @@ * java.net.http/jdk.internal.net.http.hpack * java.logging * jdk.httpserver - * @library /lib/testlibrary http2/server + * @library /test/lib http2/server * @build Http2TestServer - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @run testng/othervm CustomRequestPublisher */ @@ -62,7 +62,7 @@ import javax.net.ssl.SSLSession; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/CustomResponseSubscriber.java b/test/jdk/java/net/httpclient/CustomResponseSubscriber.java index c91f10521927fb2c21cc55b43b6ac69672a38ec8..ff7460ec4d5a4f44df2ef77d777a2ec46a264081 100644 --- a/test/jdk/java/net/httpclient/CustomResponseSubscriber.java +++ b/test/jdk/java/net/httpclient/CustomResponseSubscriber.java @@ -24,8 +24,8 @@ /* * @test * @summary Tests response body subscribers's onComplete is not invoked before onSubscribe - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame @@ -57,7 +57,7 @@ import java.net.http.HttpResponse.BodyHandler; import java.net.http.HttpResponse.BodySubscriber; import java.net.http.HttpResponse.BodySubscribers; import javax.net.ssl.SSLContext; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/DependentActionsTest.java b/test/jdk/java/net/httpclient/DependentActionsTest.java index 72563ecd4824e13209eea242fcda64c196475071..ea715a1832b1696719d7c60192e2137cea2d5f93 100644 --- a/test/jdk/java/net/httpclient/DependentActionsTest.java +++ b/test/jdk/java/net/httpclient/DependentActionsTest.java @@ -26,8 +26,8 @@ * @summary Verify that dependent synchronous actions added before the CF * completes are executed either asynchronously in an executor when the * CF later completes, or in the user thread that joins. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters DependentActionsTest + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters DependentActionsTest * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame @@ -43,7 +43,7 @@ import java.lang.StackWalker.StackFrame; import com.sun.net.httpserver.HttpServer; import com.sun.net.httpserver.HttpsConfigurator; import com.sun.net.httpserver.HttpsServer; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeTest; diff --git a/test/jdk/java/net/httpclient/DependentPromiseActionsTest.java b/test/jdk/java/net/httpclient/DependentPromiseActionsTest.java index 65843f046e04b75fe404e25994fccd0c05385d86..94e7d39e5c8d116d843cdcfeaa4a6108ecfd357b 100644 --- a/test/jdk/java/net/httpclient/DependentPromiseActionsTest.java +++ b/test/jdk/java/net/httpclient/DependentPromiseActionsTest.java @@ -26,8 +26,8 @@ * @summary Verify that dependent synchronous actions added before the promise CF * completes are executed either asynchronously in an executor when the * CF later completes, or in the user thread that joins. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters DependentPromiseActionsTest + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters DependentPromiseActionsTest * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame @@ -40,7 +40,7 @@ import java.io.BufferedReader; import java.io.InputStreamReader; import java.lang.StackWalker.StackFrame; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeTest; diff --git a/test/jdk/java/net/httpclient/DigestEchoClient.java b/test/jdk/java/net/httpclient/DigestEchoClient.java index 0a51ede7843655b062162b02c1951a4e7be0da2d..a3321dc3b3cd6d02e009bb3b7fdc86de883a4db4 100644 --- a/test/jdk/java/net/httpclient/DigestEchoClient.java +++ b/test/jdk/java/net/httpclient/DigestEchoClient.java @@ -51,7 +51,7 @@ import java.util.concurrent.atomic.AtomicLong; import java.util.stream.Collectors; import java.util.stream.Stream; import javax.net.ssl.SSLContext; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import sun.net.NetProperties; import sun.net.www.HeaderParser; import static java.lang.System.out; @@ -62,8 +62,8 @@ import static java.lang.String.format; * @summary this test verifies that a client may provides authorization * headers directly when connecting with a server. * @bug 8087112 - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters DigestEchoServer + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters DigestEchoServer * ReferenceTracker DigestEchoClient * @modules java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame diff --git a/test/jdk/java/net/httpclient/DigestEchoClientSSL.java b/test/jdk/java/net/httpclient/DigestEchoClientSSL.java index f2d3b1b07c216f9d95505c4116130ae41391369f..63e86912a5cabce60754cf326e106ae95f6e5331 100644 --- a/test/jdk/java/net/httpclient/DigestEchoClientSSL.java +++ b/test/jdk/java/net/httpclient/DigestEchoClientSSL.java @@ -26,8 +26,8 @@ * @bug 8087112 * @summary this test verifies that a client may provides authorization * headers directly when connecting with a server over SSL. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext DigestEchoServer + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext DigestEchoServer * DigestEchoClient ReferenceTracker DigestEchoClientSSL * @modules java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame diff --git a/test/jdk/java/net/httpclient/EchoHandler.java b/test/jdk/java/net/httpclient/EchoHandler.java index 64c9b0851b9de55d7e3195dfa16ceb9825208688..9fd86083801f48f35e4cae37fe684c1036af554b 100644 --- a/test/jdk/java/net/httpclient/EchoHandler.java +++ b/test/jdk/java/net/httpclient/EchoHandler.java @@ -32,7 +32,7 @@ import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.Random; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import static java.net.http.HttpRequest.*; import static java.net.http.HttpResponse.*; import java.util.logging.ConsoleHandler; diff --git a/test/jdk/java/net/httpclient/EncodedCharsInURI.java b/test/jdk/java/net/httpclient/EncodedCharsInURI.java index 94f68096d219d70b77b2fdb27405c758c7538775..6d7a42e8532ee5b08c6bb293008e17a2b3018b47 100644 --- a/test/jdk/java/net/httpclient/EncodedCharsInURI.java +++ b/test/jdk/java/net/httpclient/EncodedCharsInURI.java @@ -26,8 +26,8 @@ * @bug 8199683 * @summary Tests that escaped characters in URI are correctly * handled (not re-escaped and not unescaped) - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters EncodedCharsInURI + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters EncodedCharsInURI * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame @@ -42,7 +42,7 @@ import com.sun.net.httpserver.HttpServer; import com.sun.net.httpserver.HttpsConfigurator; import com.sun.net.httpserver.HttpsServer; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterClass; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; diff --git a/test/jdk/java/net/httpclient/EscapedOctetsInURI.java b/test/jdk/java/net/httpclient/EscapedOctetsInURI.java index 5e509c1d2a6f57d7bec4bbd2ca5323537725fa18..9e44f6aac97533ef2f2d03022c69a09b9285dbf7 100644 --- a/test/jdk/java/net/httpclient/EscapedOctetsInURI.java +++ b/test/jdk/java/net/httpclient/EscapedOctetsInURI.java @@ -31,9 +31,9 @@ * java.net.http/jdk.internal.net.http.hpack * java.logging * jdk.httpserver - * @library /lib/testlibrary http2/server + * @library /test/lib http2/server * @build Http2TestServer - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @run testng/othervm * -Djdk.httpclient.HttpClient.log=reqeusts,headers * EscapedOctetsInURI @@ -58,7 +58,7 @@ import java.net.http.HttpResponse.BodyHandlers; import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/ExpectContinue.java b/test/jdk/java/net/httpclient/ExpectContinue.java index 8715b4b10fe34d9837f14b1639d92741e7e56a93..f3bed36c75c6d00332ebe5af7714870984f10f54 100644 --- a/test/jdk/java/net/httpclient/ExpectContinue.java +++ b/test/jdk/java/net/httpclient/ExpectContinue.java @@ -26,8 +26,8 @@ * @summary Basic test for Expect 100-Continue ( HTTP/1.1 only ) * @modules java.net.http * jdk.httpserver - * @library /lib/testlibrary - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @run testng/othervm ExpectContinue */ @@ -49,7 +49,7 @@ import java.net.http.HttpResponse; import java.net.http.HttpResponse.BodyHandlers; import java.util.List; import javax.net.ssl.SSLContext; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/FlowAdapterPublisherTest.java b/test/jdk/java/net/httpclient/FlowAdapterPublisherTest.java index fb1ad779bba9556aeb032ad4442e56ecc12cf0a1..73dea64edfd33b3a4a6dc5e97e83b19e34dd9b18 100644 --- a/test/jdk/java/net/httpclient/FlowAdapterPublisherTest.java +++ b/test/jdk/java/net/httpclient/FlowAdapterPublisherTest.java @@ -43,7 +43,7 @@ import com.sun.net.httpserver.HttpsServer; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; @@ -67,9 +67,9 @@ import static org.testng.Assert.fail; * java.net.http/jdk.internal.net.http.hpack * java.logging * jdk.httpserver - * @library /lib/testlibrary http2/server + * @library /test/lib http2/server * @build Http2TestServer - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @run testng/othervm FlowAdapterPublisherTest */ diff --git a/test/jdk/java/net/httpclient/FlowAdapterSubscriberTest.java b/test/jdk/java/net/httpclient/FlowAdapterSubscriberTest.java index 9d5b084813484360a194b0b68e983495064e1b35..8a2796c991ff27e3419d20e50b639fce03e251cd 100644 --- a/test/jdk/java/net/httpclient/FlowAdapterSubscriberTest.java +++ b/test/jdk/java/net/httpclient/FlowAdapterSubscriberTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -48,7 +48,7 @@ import java.net.http.HttpRequest.BodyPublishers; import java.net.http.HttpResponse; import java.net.http.HttpResponse.BodyHandlers; import java.net.http.HttpResponse.BodySubscribers; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; @@ -68,9 +68,9 @@ import static org.testng.Assert.assertTrue; * java.net.http/jdk.internal.net.http.hpack * java.logging * jdk.httpserver - * @library /lib/testlibrary http2/server + * @library /test/lib http2/server * @build Http2TestServer - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @run testng/othervm -Djdk.internal.httpclient.debug=true FlowAdapterSubscriberTest */ diff --git a/test/jdk/java/net/httpclient/HeadTest.java b/test/jdk/java/net/httpclient/HeadTest.java index 8910f4b33bd15129e37edd1ed5c4d26b126c56e7..30fb5741d5ddc2a7da1a08a3cb79ffc37e67da1d 100644 --- a/test/jdk/java/net/httpclient/HeadTest.java +++ b/test/jdk/java/net/httpclient/HeadTest.java @@ -31,9 +31,9 @@ * java.net.http/jdk.internal.net.http.hpack * java.logging * jdk.httpserver - * @library /lib/testlibrary /test/lib http2/server + * @library /test/lib http2/server * @build Http2TestServer - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @run testng/othervm * -Djdk.httpclient.HttpClient.log=trace,headers,requests * HeadTest @@ -42,7 +42,7 @@ import com.sun.net.httpserver.HttpServer; import com.sun.net.httpserver.HttpsConfigurator; import com.sun.net.httpserver.HttpsServer; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/HttpClientBuilderTest.java b/test/jdk/java/net/httpclient/HttpClientBuilderTest.java index c041f3108be7c7970378f0a08e29558574b7393e..121793014db9bf677083f49b46b37d92495c3fff 100644 --- a/test/jdk/java/net/httpclient/HttpClientBuilderTest.java +++ b/test/jdk/java/net/httpclient/HttpClientBuilderTest.java @@ -48,7 +48,7 @@ import javax.net.ssl.SSLParameters; import java.net.http.HttpClient; import java.net.http.HttpClient.Redirect; import java.net.http.HttpClient.Version; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.Test; import static java.time.Duration.*; import static org.testng.Assert.*; @@ -56,8 +56,8 @@ import static org.testng.Assert.*; /* * @test * @summary HttpClient[.Builder] API and behaviour checks - * @library /lib/testlibrary/ - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @run testng HttpClientBuilderTest */ diff --git a/test/jdk/java/net/httpclient/HttpEchoHandler.java b/test/jdk/java/net/httpclient/HttpEchoHandler.java index e375cca2d952fbe30bb51178c4853326fb4d5b58..319a5b901f9323cfc26b796d083af71fe8d6bcba 100644 --- a/test/jdk/java/net/httpclient/HttpEchoHandler.java +++ b/test/jdk/java/net/httpclient/HttpEchoHandler.java @@ -32,7 +32,7 @@ import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.Random; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import static java.net.http.HttpRequest.*; import static java.net.http.HttpResponse.*; import java.util.logging.ConsoleHandler; diff --git a/test/jdk/java/net/httpclient/HttpsTunnelTest.java b/test/jdk/java/net/httpclient/HttpsTunnelTest.java index d582e41745fc870c5293cf7c0becf39f6dc167d4..14f509d4f4ef3de95689576e13656135027abf02 100644 --- a/test/jdk/java/net/httpclient/HttpsTunnelTest.java +++ b/test/jdk/java/net/httpclient/HttpsTunnelTest.java @@ -23,7 +23,7 @@ import com.sun.net.httpserver.HttpsConfigurator; import com.sun.net.httpserver.HttpsServer; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import javax.net.ssl.SSLContext; import java.net.InetAddress; import java.net.InetSocketAddress; @@ -49,8 +49,8 @@ import static java.lang.System.out; * be preemptively downgraded. That, is the stack should attempt * a new h2 connection to the new host. * @bug 8196967 - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters DigestEchoServer HttpsTunnelTest + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters DigestEchoServer HttpsTunnelTest * @modules java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame * java.net.http/jdk.internal.net.http.hpack diff --git a/test/jdk/java/net/httpclient/ImmutableFlowItems.java b/test/jdk/java/net/httpclient/ImmutableFlowItems.java index a9bfe032aa47268421faab9c334b3883720c7ba6..9a22a34bfe0e90fccf0666a8c776511c10b23121 100644 --- a/test/jdk/java/net/httpclient/ImmutableFlowItems.java +++ b/test/jdk/java/net/httpclient/ImmutableFlowItems.java @@ -25,8 +25,8 @@ * @test * @summary Tests response body subscribers's onNext's Lists are unmodifiable, * and that the buffers are read-only - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame @@ -57,7 +57,7 @@ import java.net.http.HttpResponse.BodyHandler; import java.net.http.HttpResponse.BodySubscriber; import java.net.http.HttpResponse.BodySubscribers; import javax.net.ssl.SSLContext; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/InvalidInputStreamSubscriptionRequest.java b/test/jdk/java/net/httpclient/InvalidInputStreamSubscriptionRequest.java index 02815e8ddfbe39376e0a7b632e2b68d568b247ef..1a7791f336a11b55ee1c83be7dbe9b9375d0662f 100644 --- a/test/jdk/java/net/httpclient/InvalidInputStreamSubscriptionRequest.java +++ b/test/jdk/java/net/httpclient/InvalidInputStreamSubscriptionRequest.java @@ -26,8 +26,8 @@ * @summary Tests an asynchronous BodySubscriber that completes * immediately with an InputStream which issues bad * requests - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext ReferenceTracker + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext ReferenceTracker * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame @@ -38,7 +38,7 @@ import com.sun.net.httpserver.HttpServer; import com.sun.net.httpserver.HttpsConfigurator; import com.sun.net.httpserver.HttpsServer; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterClass; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; diff --git a/test/jdk/java/net/httpclient/InvalidSSLContextTest.java b/test/jdk/java/net/httpclient/InvalidSSLContextTest.java index 49e1d8b060c5521b61a2043d99bf11976e842820..8f5dceb5706420187b7e78e6d366106eabbae062 100644 --- a/test/jdk/java/net/httpclient/InvalidSSLContextTest.java +++ b/test/jdk/java/net/httpclient/InvalidSSLContextTest.java @@ -25,8 +25,8 @@ * @test * @summary Test to ensure the HTTP client throws an appropriate SSL exception * when SSL context is not valid. - * @library /lib/testlibrary - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @run testng/othervm -Djdk.internal.httpclient.debug=true InvalidSSLContextTest */ @@ -47,7 +47,7 @@ import java.net.http.HttpClient.Version; import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.net.http.HttpResponse.BodyHandlers; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.Assert; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; diff --git a/test/jdk/java/net/httpclient/InvalidSubscriptionRequest.java b/test/jdk/java/net/httpclient/InvalidSubscriptionRequest.java index da2b5cf1d48f7c6b35626b21a106b0558db5ab1f..adcf169730cf60c929996953c2d540a01ecbe2b2 100644 --- a/test/jdk/java/net/httpclient/InvalidSubscriptionRequest.java +++ b/test/jdk/java/net/httpclient/InvalidSubscriptionRequest.java @@ -27,8 +27,8 @@ * @summary Tests an asynchronous BodySubscriber that completes * immediately with a Publisher<List<ByteBuffer>> whose * subscriber issues bad requests - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext ReferenceTracker + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext ReferenceTracker * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame @@ -39,7 +39,7 @@ import com.sun.net.httpserver.HttpServer; import com.sun.net.httpserver.HttpsConfigurator; import com.sun.net.httpserver.HttpsServer; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/LightWeightHttpServer.java b/test/jdk/java/net/httpclient/LightWeightHttpServer.java index 39d2990c74805687ff6a687c8fac66807d283a3a..54fa174296f1c1c4e1d10bd4949c7600b50c2b27 100644 --- a/test/jdk/java/net/httpclient/LightWeightHttpServer.java +++ b/test/jdk/java/net/httpclient/LightWeightHttpServer.java @@ -22,8 +22,8 @@ */ /** - * library /lib/testlibrary/ / - * build jdk.testlibrary.SimpleSSLContext ProxyServer + * library /test/lib / + * build jdk.test.lib.net.SimpleSSLContext ProxyServer * compile ../../../com/sun/net/httpserver/LogFilter.java * compile ../../../com/sun/net/httpserver/EchoHandler.java * compile ../../../com/sun/net/httpserver/FileServerHandler.java @@ -50,7 +50,7 @@ import java.util.logging.ConsoleHandler; import java.util.logging.Level; import java.util.logging.Logger; import javax.net.ssl.SSLContext; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; public class LightWeightHttpServer { diff --git a/test/jdk/java/net/httpclient/LineBodyHandlerTest.java b/test/jdk/java/net/httpclient/LineBodyHandlerTest.java index cf02292867a0a8a458c29873057f4e27a8b96d98..039bc9c8cd87ce08742c1b2e09ecc91537baa9ba 100644 --- a/test/jdk/java/net/httpclient/LineBodyHandlerTest.java +++ b/test/jdk/java/net/httpclient/LineBodyHandlerTest.java @@ -52,7 +52,7 @@ import javax.net.ssl.SSLContext; import com.sun.net.httpserver.HttpServer; import com.sun.net.httpserver.HttpsConfigurator; import com.sun.net.httpserver.HttpsServer; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; @@ -77,9 +77,9 @@ import static org.testng.Assert.assertTrue; * java.net.http/jdk.internal.net.http.hpack * java.logging * jdk.httpserver - * @library /lib/testlibrary http2/server + * @library /test/lib http2/server * @build Http2TestServer LineBodyHandlerTest HttpServerAdapters - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @run testng/othervm LineBodyHandlerTest */ diff --git a/test/jdk/java/net/httpclient/ManyRequests.java b/test/jdk/java/net/httpclient/ManyRequests.java index 55c96c36532aab4bba9d5743d1e27e4732bf72b8..97435d768c6f0110993f46f67341adfa6d6cb251 100644 --- a/test/jdk/java/net/httpclient/ManyRequests.java +++ b/test/jdk/java/net/httpclient/ManyRequests.java @@ -27,8 +27,8 @@ * @modules java.net.http * java.logging * jdk.httpserver - * @library /lib/testlibrary/ / - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @compile ../../../com/sun/net/httpserver/LogFilter.java * @compile ../../../com/sun/net/httpserver/EchoHandler.java * @compile ../../../com/sun/net/httpserver/FileServerHandler.java @@ -63,7 +63,7 @@ import java.util.logging.Logger; import java.util.logging.Level; import java.util.concurrent.CompletableFuture; import javax.net.ssl.SSLContext; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; public class ManyRequests { diff --git a/test/jdk/java/net/httpclient/ManyRequests2.java b/test/jdk/java/net/httpclient/ManyRequests2.java index dcbe1f42a5e1ff69c4a487ff91e709c3cba2f4ab..f600b00c348807f4ba330acf47126aa1bfdc8763 100644 --- a/test/jdk/java/net/httpclient/ManyRequests2.java +++ b/test/jdk/java/net/httpclient/ManyRequests2.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,8 +27,8 @@ * @modules java.net.http * java.logging * jdk.httpserver - * @library /lib/testlibrary/ / - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @compile ../../../com/sun/net/httpserver/LogFilter.java * @compile ../../../com/sun/net/httpserver/EchoHandler.java * @compile ../../../com/sun/net/httpserver/FileServerHandler.java @@ -36,8 +36,11 @@ * @run main/othervm/timeout=40 -Dtest.XFixed=true ManyRequests2 * @run main/othervm/timeout=40 -Dtest.XFixed=true -Dtest.insertDelay=true ManyRequests2 * @run main/othervm/timeout=40 -Dtest.XFixed=true -Dtest.chunkSize=64 ManyRequests2 - * @run main/othervm/timeout=40 -Djdk.internal.httpclient.debug=true -Dtest.XFixed=true -Dtest.insertDelay=true -Dtest.chunkSize=64 ManyRequests2 - * @summary Send a large number of requests asynchronously. The server echoes back using known content length. + * @run main/othervm/timeout=40 -Djdk.internal.httpclient.debug=true + * -Dtest.XFixed=true -Dtest.insertDelay=true + * -Dtest.chunkSize=64 ManyRequests2 + * @summary Send a large number of requests asynchronously. + * The server echoes back using known content length. */ // * @run main/othervm/timeout=40 -Djdk.httpclient.HttpClient.log=ssl ManyRequests diff --git a/test/jdk/java/net/httpclient/ManyRequestsLegacy.java b/test/jdk/java/net/httpclient/ManyRequestsLegacy.java index 01fe8d8c31f02767a360cf6b24dfbabded1b6347..e0d245bca779c2c344a48645dac245406a900140 100644 --- a/test/jdk/java/net/httpclient/ManyRequestsLegacy.java +++ b/test/jdk/java/net/httpclient/ManyRequestsLegacy.java @@ -26,16 +26,19 @@ * @modules java.net.http * java.logging * jdk.httpserver - * @library /lib/testlibrary/ / - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @compile ../../../com/sun/net/httpserver/LogFilter.java * @compile ../../../com/sun/net/httpserver/EchoHandler.java * @compile ../../../com/sun/net/httpserver/FileServerHandler.java * @run main/othervm/timeout=40 ManyRequestsLegacy * @run main/othervm/timeout=40 -Dtest.insertDelay=true ManyRequestsLegacy * @run main/othervm/timeout=40 -Dtest.chunkSize=64 ManyRequestsLegacy - * @run main/othervm/timeout=40 -Dtest.insertDelay=true -Dtest.chunkSize=64 ManyRequestsLegacy - * @summary Send a large number of requests asynchronously using the legacy URL.openConnection(), to help sanitize results of the test ManyRequest.java. + * @run main/othervm/timeout=40 -Dtest.insertDelay=true + * -Dtest.chunkSize=64 ManyRequestsLegacy + * @summary Send a large number of requests asynchronously using the legacy + * URL.openConnection(), to help sanitize results of the test + * ManyRequest.java. */ import javax.net.ssl.HttpsURLConnection; @@ -70,7 +73,7 @@ import java.util.LinkedList; import java.util.Random; import java.util.logging.Logger; import java.util.logging.Level; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; public class ManyRequestsLegacy { diff --git a/test/jdk/java/net/httpclient/MappingResponseSubscriber.java b/test/jdk/java/net/httpclient/MappingResponseSubscriber.java index 026fcbbabdea3b98e79148cecf26dd1734e586a6..cbe936afe9385ae444bb4dcbc2181903565b9cd0 100644 --- a/test/jdk/java/net/httpclient/MappingResponseSubscriber.java +++ b/test/jdk/java/net/httpclient/MappingResponseSubscriber.java @@ -24,8 +24,8 @@ /* * @test * @summary Tests mapped response subscriber - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame @@ -62,7 +62,7 @@ import java.net.http.HttpResponse.BodySubscribers; import java.net.http.HttpResponse.BodySubscriber; import java.util.function.Function; import javax.net.ssl.SSLContext; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/MaxStreams.java b/test/jdk/java/net/httpclient/MaxStreams.java index c1b86487b0746fcdb50317f8968d226d8af80a00..07ae0b4d5bc04fe7fdb89334884bc93d09dae55b 100644 --- a/test/jdk/java/net/httpclient/MaxStreams.java +++ b/test/jdk/java/net/httpclient/MaxStreams.java @@ -32,9 +32,9 @@ * java.net.http/jdk.internal.net.http.hpack * java.logging * jdk.httpserver - * @library /lib/testlibrary http2/server + * @library /test/lib http2/server * @build Http2TestServer - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @run testng/othervm -ea -esa MaxStreams */ @@ -60,7 +60,7 @@ import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.net.http.HttpResponse.BodyHandler; import java.net.http.HttpResponse.BodyHandlers; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/NoBodyPartOne.java b/test/jdk/java/net/httpclient/NoBodyPartOne.java index e71225df70bdecfac4e1697fdd22191ea9b0c408..66aaa2fc0e0735c06d05bc1b4a4f22cd3c4a71e3 100644 --- a/test/jdk/java/net/httpclient/NoBodyPartOne.java +++ b/test/jdk/java/net/httpclient/NoBodyPartOne.java @@ -25,8 +25,8 @@ * @test * @bug 8161157 * @summary Test response body handlers/subscribers when there is no body - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame diff --git a/test/jdk/java/net/httpclient/NoBodyPartTwo.java b/test/jdk/java/net/httpclient/NoBodyPartTwo.java index e612695b513334a8a4d681fdd0a81f15073dcf00..ba4843e2901191b439a67aa08b8b491267a362dc 100644 --- a/test/jdk/java/net/httpclient/NoBodyPartTwo.java +++ b/test/jdk/java/net/httpclient/NoBodyPartTwo.java @@ -25,8 +25,8 @@ * @test * @bug 8161157 * @summary Test response body handlers/subscribers when there is no body - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame diff --git a/test/jdk/java/net/httpclient/NonAsciiCharsInURI.java b/test/jdk/java/net/httpclient/NonAsciiCharsInURI.java index 2ce05ac40b9d0dd8906287003c631e89a9ef1980..e3701a826f2d454a0c3d54d5a2051b9cbf06d153 100644 --- a/test/jdk/java/net/httpclient/NonAsciiCharsInURI.java +++ b/test/jdk/java/net/httpclient/NonAsciiCharsInURI.java @@ -32,9 +32,9 @@ * java.net.http/jdk.internal.net.http.hpack * java.logging * jdk.httpserver - * @library /lib/testlibrary http2/server + * @library /test/lib http2/server * @build Http2TestServer - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @compile -encoding utf-8 NonAsciiCharsInURI.java * @run testng/othervm * -Djdk.httpclient.HttpClient.log=reqeusts,headers @@ -58,7 +58,7 @@ import java.net.http.HttpResponse.BodyHandlers; import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/ProxyAuthDisabledSchemes.java b/test/jdk/java/net/httpclient/ProxyAuthDisabledSchemes.java index 2827aca872196d9f85626ab1167eb366551e3882..4de6a295a96c2901ee2facbf49a90e5039cc41a1 100644 --- a/test/jdk/java/net/httpclient/ProxyAuthDisabledSchemes.java +++ b/test/jdk/java/net/httpclient/ProxyAuthDisabledSchemes.java @@ -28,8 +28,8 @@ * it verifies that the client honor the jdk.http.auth.*.disabledSchemes * net properties. * @bug 8087112 - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext DigestEchoServer DigestEchoClient + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext DigestEchoServer DigestEchoClient * ReferenceTracker ProxyAuthDisabledSchemes * @modules java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame diff --git a/test/jdk/java/net/httpclient/ProxyAuthDisabledSchemesSSL.java b/test/jdk/java/net/httpclient/ProxyAuthDisabledSchemesSSL.java index f3541bce7f976946b890e976af1a3d1e2470a7df..a5642d43c3387a37ee476231fd120ad2e2cc234b 100644 --- a/test/jdk/java/net/httpclient/ProxyAuthDisabledSchemesSSL.java +++ b/test/jdk/java/net/httpclient/ProxyAuthDisabledSchemesSSL.java @@ -28,8 +28,8 @@ * headers directly when connecting with a server over SSL, and * it verifies that the client honor the jdk.http.auth.*.disabledSchemes * net properties. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext DigestEchoServer DigestEchoClient + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext DigestEchoServer DigestEchoClient * ReferenceTracker ProxyAuthDisabledSchemesSSL * @modules java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame diff --git a/test/jdk/java/net/httpclient/ProxyTest.java b/test/jdk/java/net/httpclient/ProxyTest.java index 06091818cfe67d9de8e5cb00e66a6f660a8f5562..1c7a8f894591ec8b42be9254e6e62184969812f0 100644 --- a/test/jdk/java/net/httpclient/ProxyTest.java +++ b/test/jdk/java/net/httpclient/ProxyTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -56,7 +56,7 @@ import javax.net.ssl.SSLSession; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; /** * @test @@ -67,8 +67,8 @@ import jdk.testlibrary.SimpleSSLContext; * an SSL Tunnel connection when the client is HTTP/2 and the server * and proxy are HTTP/1.1 * @modules java.net.http - * @library /lib/testlibrary/ - * @build jdk.testlibrary.SimpleSSLContext ProxyTest + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext ProxyTest * @run main/othervm ProxyTest * @author danielfuchs */ diff --git a/test/jdk/java/net/httpclient/RedirectMethodChange.java b/test/jdk/java/net/httpclient/RedirectMethodChange.java index eb445ebac47d700bb94a5a6ba21f6a33eeb340cc..c5d4aef8676bfaa9694feed790cd8d556e917db7 100644 --- a/test/jdk/java/net/httpclient/RedirectMethodChange.java +++ b/test/jdk/java/net/httpclient/RedirectMethodChange.java @@ -29,9 +29,9 @@ * java.net.http/jdk.internal.net.http.frame * java.net.http/jdk.internal.net.http.hpack * jdk.httpserver - * @library /lib/testlibrary /test/lib http2/server + * @library /test/lib http2/server * @build Http2TestServer - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @run testng/othervm RedirectMethodChange */ @@ -50,7 +50,7 @@ import java.net.http.HttpResponse.BodyHandlers; import com.sun.net.httpserver.HttpServer; import com.sun.net.httpserver.HttpsConfigurator; import com.sun.net.httpserver.HttpsServer; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/RedirectWithCookie.java b/test/jdk/java/net/httpclient/RedirectWithCookie.java index dc6d5aa4f95852ec63e89f6f91e28f76ecfffb91..14d971b91650dbde69f6e8d080e00b66512a7e07 100644 --- a/test/jdk/java/net/httpclient/RedirectWithCookie.java +++ b/test/jdk/java/net/httpclient/RedirectWithCookie.java @@ -30,9 +30,9 @@ * java.net.http/jdk.internal.net.http.hpack * java.logging * jdk.httpserver - * @library /lib/testlibrary /test/lib http2/server + * @library /test/lib http2/server * @build Http2TestServer - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @run testng/othervm * -Djdk.httpclient.HttpClient.log=trace,headers,requests * RedirectWithCookie @@ -55,7 +55,7 @@ import java.net.http.HttpResponse; import java.net.http.HttpResponse.BodyHandlers; import java.util.List; import javax.net.ssl.SSLContext; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/RequestBodyTest.java b/test/jdk/java/net/httpclient/RequestBodyTest.java index 12238b8dd2c9f4476f5bfae69791e6f6215695dd..b323efd86e52488703f865f59bf2e0b6680c7c7a 100644 --- a/test/jdk/java/net/httpclient/RequestBodyTest.java +++ b/test/jdk/java/net/httpclient/RequestBodyTest.java @@ -27,11 +27,11 @@ * @modules java.net.http * java.logging * jdk.httpserver - * @library /lib/testlibrary/ /test/lib + * @library /test/lib * @compile ../../../com/sun/net/httpserver/LogFilter.java * @compile ../../../com/sun/net/httpserver/EchoHandler.java * @compile ../../../com/sun/net/httpserver/FileServerHandler.java - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @build LightWeightHttpServer * @build jdk.test.lib.Platform * @build jdk.test.lib.util.FileUtils diff --git a/test/jdk/java/net/httpclient/RequestBodyTest.policy b/test/jdk/java/net/httpclient/RequestBodyTest.policy index f2f57e6f6d4b8df30f1bb6e3a8e49d38abc2d7ad..d3797cf472ddc5b4f5859d9b1fea8586587ce154 100644 --- a/test/jdk/java/net/httpclient/RequestBodyTest.policy +++ b/test/jdk/java/net/httpclient/RequestBodyTest.policy @@ -27,10 +27,10 @@ grant codeBase "file:${test.classes}/../../../../test/lib/-" { permission java.io.FilePermission "RequestBodyTest.tmp", "read,delete"; }; -// for JTwork/classes/0/lib/testlibrary/jdk/testlibrary/SimpleSSLContext.class -grant codeBase "file:${test.classes}/../../../../lib/testlibrary/-" { +// for JTwork/classes/0/test/lib/jdk/test/lib/net/SimpleSSLContext.class +grant codeBase "file:${test.classes}/../../../../test/lib/-" { permission java.util.PropertyPermission "test.src.path", "read"; - permission java.io.FilePermission "${test.src}/../../../lib/testlibrary/jdk/testlibrary/testkeys", "read"; + permission java.io.FilePermission "${test.src}/../../../../lib/jdk/test/lib/net/testkeys", "read"; }; grant codeBase "file:${test.classes}/*" { diff --git a/test/jdk/java/net/httpclient/ResponseBodyBeforeError.java b/test/jdk/java/net/httpclient/ResponseBodyBeforeError.java index 4a9aa49f118ba5d38f3dc08145bbbf0193601f60..7f990138e794834422fb7f748ec2c5fbb628becf 100644 --- a/test/jdk/java/net/httpclient/ResponseBodyBeforeError.java +++ b/test/jdk/java/net/httpclient/ResponseBodyBeforeError.java @@ -25,8 +25,8 @@ * @test * @summary Tests that all response body is delivered to the BodySubscriber * before an abortive error terminates the flow - * @library /lib/testlibrary - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @run testng/othervm ResponseBodyBeforeError */ @@ -52,7 +52,7 @@ import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletionStage; import java.util.concurrent.ExecutionException; import java.util.concurrent.Flow; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/ResponsePublisher.java b/test/jdk/java/net/httpclient/ResponsePublisher.java index 44e7240ed8e81966cfc6c717f13160d7a0dbfae7..862b6c1804396187e50e023a18ac86e8b0044ab6 100644 --- a/test/jdk/java/net/httpclient/ResponsePublisher.java +++ b/test/jdk/java/net/httpclient/ResponsePublisher.java @@ -26,8 +26,8 @@ * @bug 8201186 * @summary Tests an asynchronous BodySubscriber that completes * immediately with a Publisher<List<ByteBuffer>> - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame @@ -40,7 +40,7 @@ import com.sun.net.httpserver.HttpHandler; import com.sun.net.httpserver.HttpServer; import com.sun.net.httpserver.HttpsConfigurator; import com.sun.net.httpserver.HttpsServer; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/RetryWithCookie.java b/test/jdk/java/net/httpclient/RetryWithCookie.java index 6f85f6ac70441a7355e13fd3999d612c1666a5fb..9e7442412b715e5700688795fcbb9ddba9550508 100644 --- a/test/jdk/java/net/httpclient/RetryWithCookie.java +++ b/test/jdk/java/net/httpclient/RetryWithCookie.java @@ -31,9 +31,9 @@ * java.net.http/jdk.internal.net.http.hpack * java.logging * jdk.httpserver - * @library /lib/testlibrary /test/lib http2/server + * @library /test/lib http2/server * @build Http2TestServer - * @build jdk.testlibrary.SimpleSSLContext ReferenceTracker + * @build jdk.test.lib.net.SimpleSSLContext ReferenceTracker * @run testng/othervm * -Djdk.httpclient.HttpClient.log=trace,headers,requests * RetryWithCookie @@ -42,7 +42,7 @@ import com.sun.net.httpserver.HttpServer; import com.sun.net.httpserver.HttpsConfigurator; import com.sun.net.httpserver.HttpsServer; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/ServerCloseTest.java b/test/jdk/java/net/httpclient/ServerCloseTest.java index aa1ca9dcaade0d303794a8813e1bab94ec4009ce..d7fa39aa56a9be352fa13af3b6866f534ca49508 100644 --- a/test/jdk/java/net/httpclient/ServerCloseTest.java +++ b/test/jdk/java/net/httpclient/ServerCloseTest.java @@ -25,8 +25,8 @@ * @test * @summary Tests that our client deals correctly with servers that * close the connection right after sending the last byte. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters EncodedCharsInURI + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters EncodedCharsInURI * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame @@ -35,7 +35,7 @@ */ //* -Djdk.internal.httpclient.debug=true -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterClass; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; diff --git a/test/jdk/java/net/httpclient/ShortResponseBody.java b/test/jdk/java/net/httpclient/ShortResponseBody.java index ab9e3683d9a5cc830ce0e332d3117fac4063fe30..69c77898ee27b6172c85d5e8e9017c23c26f250c 100644 --- a/test/jdk/java/net/httpclient/ShortResponseBody.java +++ b/test/jdk/java/net/httpclient/ShortResponseBody.java @@ -25,8 +25,8 @@ * @test * @summary Tests Exception detail message when too few response bytes are * received before a socket exception or eof. - * @library /lib/testlibrary - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @run testng/othervm * -Djdk.httpclient.HttpClient.log=headers,errors,channel * ShortResponseBody @@ -55,7 +55,7 @@ import java.util.concurrent.Executors; import java.util.concurrent.ThreadFactory; import java.util.concurrent.atomic.AtomicLong; import java.util.stream.Stream; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/ShortResponseBodyWithRetry.java b/test/jdk/java/net/httpclient/ShortResponseBodyWithRetry.java index c6aaca978d24c55d2b8d8f2ea407cfbb780c45cc..00446fb91b6e3effa9cdc7b6970e64baa42fdcff 100644 --- a/test/jdk/java/net/httpclient/ShortResponseBodyWithRetry.java +++ b/test/jdk/java/net/httpclient/ShortResponseBodyWithRetry.java @@ -24,8 +24,8 @@ /* * @test * @summary Run of ShortResponseBody with -Djdk.httpclient.enableAllMethodRetry - * @library /lib/testlibrary - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @build ShortResponseBody * @run testng/othervm * -Djdk.httpclient.HttpClient.log=headers,errors,channel diff --git a/test/jdk/java/net/httpclient/SmokeTest.java b/test/jdk/java/net/httpclient/SmokeTest.java index 7bc41bbd6561943e7d7287fcc510889a00ec89df..51626cc0b815f953e2cad2780d52f886806fc22a 100644 --- a/test/jdk/java/net/httpclient/SmokeTest.java +++ b/test/jdk/java/net/httpclient/SmokeTest.java @@ -27,8 +27,8 @@ * @modules java.net.http * java.logging * jdk.httpserver - * @library /lib/testlibrary/ / - * @build jdk.testlibrary.SimpleSSLContext ProxyServer + * @library /test/lib / + * @build jdk.test.lib.net.SimpleSSLContext ProxyServer * @compile ../../../com/sun/net/httpserver/LogFilter.java * @compile ../../../com/sun/net/httpserver/EchoHandler.java * @compile ../../../com/sun/net/httpserver/FileServerHandler.java @@ -88,7 +88,7 @@ import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.Random; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import static java.nio.file.StandardOpenOption.TRUNCATE_EXISTING; import static java.nio.file.StandardOpenOption.WRITE; diff --git a/test/jdk/java/net/httpclient/SpecialHeadersTest.java b/test/jdk/java/net/httpclient/SpecialHeadersTest.java index ddf054f3aea6c05f2ed8e4bdba929b1aa51cf712..29fca738058b7992a2816382bdfd1b0e8eda1632 100644 --- a/test/jdk/java/net/httpclient/SpecialHeadersTest.java +++ b/test/jdk/java/net/httpclient/SpecialHeadersTest.java @@ -32,9 +32,9 @@ * java.net.http/jdk.internal.net.http.hpack * java.logging * jdk.httpserver - * @library /lib/testlibrary http2/server + * @library /test/lib http2/server * @build Http2TestServer HttpServerAdapters SpecialHeadersTest - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @run testng/othervm * -Djdk.httpclient.HttpClient.log=requests,headers,errors * SpecialHeadersTest @@ -43,7 +43,7 @@ import com.sun.net.httpserver.HttpServer; import com.sun.net.httpserver.HttpsConfigurator; import com.sun.net.httpserver.HttpsServer; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/SplitResponse.java b/test/jdk/java/net/httpclient/SplitResponse.java index b0fcfaf724afef74d21dc00a6ca1f9ef2701019d..48f958047b71ada6fc7d3e4184b3a7f400d41c0b 100644 --- a/test/jdk/java/net/httpclient/SplitResponse.java +++ b/test/jdk/java/net/httpclient/SplitResponse.java @@ -40,7 +40,7 @@ import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.util.stream.Stream; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import static java.lang.System.out; import static java.lang.String.format; import static java.nio.charset.StandardCharsets.ISO_8859_1; @@ -49,8 +49,8 @@ import static java.net.http.HttpResponse.BodyHandlers.ofString; /** * @test * @bug 8087112 - * @library /lib/testlibrary - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @build MockServer * @run main/othervm * -Djdk.internal.httpclient.debug=true diff --git a/test/jdk/java/net/httpclient/SplitResponseAsync.java b/test/jdk/java/net/httpclient/SplitResponseAsync.java index e148e6a05be09bf2f9cbc5234f28683f6ae469e8..caed3dc8d67fec3cc9a41adc86c6a2bcf7b8abfe 100644 --- a/test/jdk/java/net/httpclient/SplitResponseAsync.java +++ b/test/jdk/java/net/httpclient/SplitResponseAsync.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,8 +24,8 @@ /** * @test * @bug 8087112 - * @library /lib/testlibrary - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @build MockServer SplitResponse * @run main/othervm * -Djdk.internal.httpclient.debug=true diff --git a/test/jdk/java/net/httpclient/SplitResponseKeepAlive.java b/test/jdk/java/net/httpclient/SplitResponseKeepAlive.java index 7cc4696e3f5fa4c41d61c90316a6a024ccb2ffb5..f805f26a1e47780b32e37fcd0d4df331d9fec78d 100644 --- a/test/jdk/java/net/httpclient/SplitResponseKeepAlive.java +++ b/test/jdk/java/net/httpclient/SplitResponseKeepAlive.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,8 +24,8 @@ /** * @test * @bug 8087112 - * @library /lib/testlibrary - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @build MockServer SplitResponse * @run main/othervm * -Djdk.internal.httpclient.debug=true diff --git a/test/jdk/java/net/httpclient/SplitResponseKeepAliveAsync.java b/test/jdk/java/net/httpclient/SplitResponseKeepAliveAsync.java index 8dba0339385937a36c1764a85f5fc542524523e3..c8d034444b6c46d820ab0243f00b0f5ba53bb5cc 100644 --- a/test/jdk/java/net/httpclient/SplitResponseKeepAliveAsync.java +++ b/test/jdk/java/net/httpclient/SplitResponseKeepAliveAsync.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,8 +24,8 @@ /** * @test * @bug 8087112 - * @library /lib/testlibrary - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @build MockServer SplitResponse * @run main/othervm * -Djdk.internal.httpclient.debug=true diff --git a/test/jdk/java/net/httpclient/SplitResponseSSL.java b/test/jdk/java/net/httpclient/SplitResponseSSL.java index 1c7f8522172a75b314eeed9b6ccbfa7970483af5..ba030d74efa0dc5713b0f752a461cdd8a296c864 100644 --- a/test/jdk/java/net/httpclient/SplitResponseSSL.java +++ b/test/jdk/java/net/httpclient/SplitResponseSSL.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,8 +24,8 @@ /** * @test * @bug 8087112 - * @library /lib/testlibrary - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @build MockServer SplitResponse * @run main/othervm * -Djdk.internal.httpclient.debug=true diff --git a/test/jdk/java/net/httpclient/SplitResponseSSLAsync.java b/test/jdk/java/net/httpclient/SplitResponseSSLAsync.java index 09d2d059d4ad3eda6c72e5b67346014d7829542e..e78b6703d5951e0dbedf922ae177beade634ca6f 100644 --- a/test/jdk/java/net/httpclient/SplitResponseSSLAsync.java +++ b/test/jdk/java/net/httpclient/SplitResponseSSLAsync.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,8 +24,8 @@ /** * @test * @bug 8087112 - * @library /lib/testlibrary - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @build MockServer SplitResponse * @run main/othervm * -Djdk.internal.httpclient.debug=true diff --git a/test/jdk/java/net/httpclient/SplitResponseSSLKeepAlive.java b/test/jdk/java/net/httpclient/SplitResponseSSLKeepAlive.java index 43080a0eba3441a9716e54f7d842d9153b8b3ffa..9892370cdef35b930855093a4094915be7979db7 100644 --- a/test/jdk/java/net/httpclient/SplitResponseSSLKeepAlive.java +++ b/test/jdk/java/net/httpclient/SplitResponseSSLKeepAlive.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,8 +24,8 @@ /** * @test * @bug 8087112 - * @library /lib/testlibrary - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @build MockServer SplitResponse * @run main/othervm * -Djdk.internal.httpclient.debug=true diff --git a/test/jdk/java/net/httpclient/SplitResponseSSLKeepAliveAsync.java b/test/jdk/java/net/httpclient/SplitResponseSSLKeepAliveAsync.java index d1fccdc37f78d74285b05746c91ba852b15f6a1e..96dbb5f5bc0fcf24cda6c80026fabfc3615f8495 100644 --- a/test/jdk/java/net/httpclient/SplitResponseSSLKeepAliveAsync.java +++ b/test/jdk/java/net/httpclient/SplitResponseSSLKeepAliveAsync.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,8 +24,8 @@ /** * @test * @bug 8087112 - * @library /lib/testlibrary - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @build MockServer SplitResponse * @run main/othervm * -Djdk.internal.httpclient.debug=true diff --git a/test/jdk/java/net/httpclient/StreamingBody.java b/test/jdk/java/net/httpclient/StreamingBody.java index 5079bf69ae0b53c77e85fb804714589c71f0be82..9572d14a81cd622db3a06136b5700995480aa402 100644 --- a/test/jdk/java/net/httpclient/StreamingBody.java +++ b/test/jdk/java/net/httpclient/StreamingBody.java @@ -31,9 +31,9 @@ * java.net.http/jdk.internal.net.http.hpack * java.logging * jdk.httpserver - * @library /lib/testlibrary /test/lib http2/server + * @library /test/lib http2/server * @build Http2TestServer - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @run testng/othervm * -Djdk.httpclient.HttpClient.log=trace,headers,requests * StreamingBody @@ -53,7 +53,7 @@ import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.net.http.HttpResponse.BodyHandlers; import javax.net.ssl.SSLContext; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/ThrowingPublishersCustomAfterCancel.java b/test/jdk/java/net/httpclient/ThrowingPublishersCustomAfterCancel.java index 5a1f56c30e495290b5f75c07a913f44e78c49aff..318b4622b50e976a0b3e8c84d9ade5f15c55e88d 100644 --- a/test/jdk/java/net/httpclient/ThrowingPublishersCustomAfterCancel.java +++ b/test/jdk/java/net/httpclient/ThrowingPublishersCustomAfterCancel.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when request publishers * throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker AbstractThrowingPublishers ThrowingPublishersCustomAfterCancel * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/ThrowingPublishersCustomBeforeCancel.java b/test/jdk/java/net/httpclient/ThrowingPublishersCustomBeforeCancel.java index 99ef419dfe7270a4e5899c089bd439ff59f298b6..aaf05ee2a55f3142d7b1326aa53204b97f528a70 100644 --- a/test/jdk/java/net/httpclient/ThrowingPublishersCustomBeforeCancel.java +++ b/test/jdk/java/net/httpclient/ThrowingPublishersCustomBeforeCancel.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when request publishers * throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker AbstractThrowingPublishers ThrowingPublishersCustomBeforeCancel * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/ThrowingPublishersIOAfterCancel.java b/test/jdk/java/net/httpclient/ThrowingPublishersIOAfterCancel.java index 4aff72f126b28ef027379cd697f55bc40c2e13c2..4af4827bdd38dedf4717903f38c9e11913e29272 100644 --- a/test/jdk/java/net/httpclient/ThrowingPublishersIOAfterCancel.java +++ b/test/jdk/java/net/httpclient/ThrowingPublishersIOAfterCancel.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when request publishers * throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker AbstractThrowingPublishers ThrowingPublishersIOAfterCancel * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/ThrowingPublishersIOBeforeCancel.java b/test/jdk/java/net/httpclient/ThrowingPublishersIOBeforeCancel.java index 9da7bb33fd1efe895ce9dbc4e2aa1f8696ae1dd0..63c360725090b43759509cb800b031075e67ec83 100644 --- a/test/jdk/java/net/httpclient/ThrowingPublishersIOBeforeCancel.java +++ b/test/jdk/java/net/httpclient/ThrowingPublishersIOBeforeCancel.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when request publishers * throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker AbstractThrowingPublishers ThrowingPublishersIOBeforeCancel * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/ThrowingPublishersInNextRequest.java b/test/jdk/java/net/httpclient/ThrowingPublishersInNextRequest.java index bae0a6a6099fb8ed8ec3464db32915f34e790af8..7ffc09da04268813f695e130cafbf4520e8a0b4f 100644 --- a/test/jdk/java/net/httpclient/ThrowingPublishersInNextRequest.java +++ b/test/jdk/java/net/httpclient/ThrowingPublishersInNextRequest.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when request publishers * throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker AbstractThrowingPublishers ThrowingPublishersInNextRequest * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/ThrowingPublishersInRequest.java b/test/jdk/java/net/httpclient/ThrowingPublishersInRequest.java index 27c0749379e9a6be0dc5923650deffd1f297d1d0..60e0e2aa14711fa7928ae443d77db884e9e41ea1 100644 --- a/test/jdk/java/net/httpclient/ThrowingPublishersInRequest.java +++ b/test/jdk/java/net/httpclient/ThrowingPublishersInRequest.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when request publishers * throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker AbstractThrowingPublishers ThrowingPublishersInRequest * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/ThrowingPublishersInSubscribe.java b/test/jdk/java/net/httpclient/ThrowingPublishersInSubscribe.java index 7c626adae31c622a3b970492f1992eb21b29fbbb..5b1dd9d36ff4a14f095aa29439f5265629f1f97a 100644 --- a/test/jdk/java/net/httpclient/ThrowingPublishersInSubscribe.java +++ b/test/jdk/java/net/httpclient/ThrowingPublishersInSubscribe.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when request publishers * throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker AbstractThrowingPublishers ThrowingPublishersInSubscribe * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/ThrowingPublishersSanity.java b/test/jdk/java/net/httpclient/ThrowingPublishersSanity.java index eeec40fc20a19547ac968fa3f5d091334ac4cf1d..48f6fc913d3ad6160650ab6ca96f001595df9e6b 100644 --- a/test/jdk/java/net/httpclient/ThrowingPublishersSanity.java +++ b/test/jdk/java/net/httpclient/ThrowingPublishersSanity.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when request publishers * throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker AbstractThrowingPublishers ThrowingPublishersSanity * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/ThrowingPushPromisesAsInputStreamCustom.java b/test/jdk/java/net/httpclient/ThrowingPushPromisesAsInputStreamCustom.java index 1f4fac2910ac4969ac81a48b44e2a3a83135a6a4..c3801a0c4293b9b803307aa9caaa7e5123851a68 100644 --- a/test/jdk/java/net/httpclient/ThrowingPushPromisesAsInputStreamCustom.java +++ b/test/jdk/java/net/httpclient/ThrowingPushPromisesAsInputStreamCustom.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when push promise handlers and their * response body handlers and subscribers throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker AbstractThrowingPushPromises ThrowingPushPromisesAsInputStreamCustom * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/ThrowingPushPromisesAsInputStreamIO.java b/test/jdk/java/net/httpclient/ThrowingPushPromisesAsInputStreamIO.java index e4955648d8fd5edd661e13f00e1e45475e81bd58..f11c31421a18301aaef4a687ed4c68052ed4185a 100644 --- a/test/jdk/java/net/httpclient/ThrowingPushPromisesAsInputStreamIO.java +++ b/test/jdk/java/net/httpclient/ThrowingPushPromisesAsInputStreamIO.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when push promise handlers and their * response body handlers and subscribers throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker AbstractThrowingPushPromises ThrowingPushPromisesAsInputStreamIO * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/ThrowingPushPromisesAsLinesCustom.java b/test/jdk/java/net/httpclient/ThrowingPushPromisesAsLinesCustom.java index 1e9b596a79f10513f763ae69e51f6af1687a4cee..847bc38283879c3e434442b76b01217e51078b1f 100644 --- a/test/jdk/java/net/httpclient/ThrowingPushPromisesAsLinesCustom.java +++ b/test/jdk/java/net/httpclient/ThrowingPushPromisesAsLinesCustom.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when push promise handlers and their * response body handlers and subscribers throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker AbstractThrowingPushPromises ThrowingPushPromisesAsLinesCustom * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/ThrowingPushPromisesAsLinesIO.java b/test/jdk/java/net/httpclient/ThrowingPushPromisesAsLinesIO.java index e860039980f882ae671ba46674112dedd1c519ab..7b7ffab49a215d122d38d90423877334cd2f6cca 100644 --- a/test/jdk/java/net/httpclient/ThrowingPushPromisesAsLinesIO.java +++ b/test/jdk/java/net/httpclient/ThrowingPushPromisesAsLinesIO.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when push promise handlers and their * response body handlers and subscribers throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker AbstractThrowingPushPromises ThrowingPushPromisesAsLinesIO * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/ThrowingPushPromisesAsStringCustom.java b/test/jdk/java/net/httpclient/ThrowingPushPromisesAsStringCustom.java index 75decf5bb1e04193c655e07dcc0f4b363644c7db..eb6f2a7c8f90870e18af65c1f854eefc114317d0 100644 --- a/test/jdk/java/net/httpclient/ThrowingPushPromisesAsStringCustom.java +++ b/test/jdk/java/net/httpclient/ThrowingPushPromisesAsStringCustom.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when push promise handlers and their * response body handlers and subscribers throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker AbstractThrowingPushPromises ThrowingPushPromisesAsStringCustom * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/ThrowingPushPromisesAsStringIO.java b/test/jdk/java/net/httpclient/ThrowingPushPromisesAsStringIO.java index 8e070469a1ba8658432cab738c28ef869fea52a5..24d38f1a6dfe0df5e567582a9038b283871c6f52 100644 --- a/test/jdk/java/net/httpclient/ThrowingPushPromisesAsStringIO.java +++ b/test/jdk/java/net/httpclient/ThrowingPushPromisesAsStringIO.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when push promise handlers and their * response body handlers and subscribers throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker AbstractThrowingPushPromises ThrowingPushPromisesAsStringIO * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/ThrowingPushPromisesSanity.java b/test/jdk/java/net/httpclient/ThrowingPushPromisesSanity.java index c6a70418369e3082cb9ffb1085d80b3bac824908..b2ffd374d2e07e3a0fcee8c531422617f7ee0313 100644 --- a/test/jdk/java/net/httpclient/ThrowingPushPromisesSanity.java +++ b/test/jdk/java/net/httpclient/ThrowingPushPromisesSanity.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when push promise handlers and their * response body handlers and subscribers throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker AbstractThrowingPushPromises ThrowingPushPromisesSanity * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/ThrowingSubscribersAsInputStream.java b/test/jdk/java/net/httpclient/ThrowingSubscribersAsInputStream.java index 7a79abab723dce0862285fa37ca9ade3ec631c2c..eb2636f31590fad1b2f21755d6cd2db8bf81e672 100644 --- a/test/jdk/java/net/httpclient/ThrowingSubscribersAsInputStream.java +++ b/test/jdk/java/net/httpclient/ThrowingSubscribersAsInputStream.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when response body handlers and subscribers * throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker ThrowingSubscribersAsInputStream AbstractThrowingSubscribers * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/ThrowingSubscribersAsInputStreamAsync.java b/test/jdk/java/net/httpclient/ThrowingSubscribersAsInputStreamAsync.java index 1a52bc1d3c2724cb4dd952a8717396d40261dfca..98baae29ec2324416d988adc20c809361deebb95 100644 --- a/test/jdk/java/net/httpclient/ThrowingSubscribersAsInputStreamAsync.java +++ b/test/jdk/java/net/httpclient/ThrowingSubscribersAsInputStreamAsync.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when response body handlers and subscribers * throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker ThrowingSubscribersAsInputStreamAsync AbstractThrowingSubscribers * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/ThrowingSubscribersAsLines.java b/test/jdk/java/net/httpclient/ThrowingSubscribersAsLines.java index 30d00493f6c72d0db7f87b38e940142b3d7de9eb..eccdf54f398796106e210c51dcc605f55abe29b0 100644 --- a/test/jdk/java/net/httpclient/ThrowingSubscribersAsLines.java +++ b/test/jdk/java/net/httpclient/ThrowingSubscribersAsLines.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when response body handlers and subscribers * throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker ThrowingSubscribersAsLines AbstractThrowingSubscribers * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/ThrowingSubscribersAsLinesAsync.java b/test/jdk/java/net/httpclient/ThrowingSubscribersAsLinesAsync.java index 3506745d1b6a570a91b5d307f5768593a48a9c6b..ba3583244b6c9738a4c74e13fedb6d3bf473dadb 100644 --- a/test/jdk/java/net/httpclient/ThrowingSubscribersAsLinesAsync.java +++ b/test/jdk/java/net/httpclient/ThrowingSubscribersAsLinesAsync.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when response body handlers and subscribers * throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker ThrowingSubscribersAsLinesAsync AbstractThrowingSubscribers * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/ThrowingSubscribersAsString.java b/test/jdk/java/net/httpclient/ThrowingSubscribersAsString.java index 909e5e0c0459bfa093d0db8035aea0e6f08f143b..43ec07568429d964753ed9942db0ecef3932c03c 100644 --- a/test/jdk/java/net/httpclient/ThrowingSubscribersAsString.java +++ b/test/jdk/java/net/httpclient/ThrowingSubscribersAsString.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when response body handlers and subscribers * throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker ThrowingSubscribersAsString AbstractThrowingSubscribers * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/ThrowingSubscribersAsStringAsync.java b/test/jdk/java/net/httpclient/ThrowingSubscribersAsStringAsync.java index 9944e9b6fd8f796785247e64ba73370a2ce4fdb1..9620bf20f52e4944c1af459ef9ad0e1fd8f0e85b 100644 --- a/test/jdk/java/net/httpclient/ThrowingSubscribersAsStringAsync.java +++ b/test/jdk/java/net/httpclient/ThrowingSubscribersAsStringAsync.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when response body handlers and subscribers * throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker ThrowingSubscribersAsStringAsync AbstractThrowingSubscribers * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/ThrowingSubscribersSanity.java b/test/jdk/java/net/httpclient/ThrowingSubscribersSanity.java index a78d330b4252ff5144e4ab33d7be8327cd96a6f8..7e4d600f0fc5b661bf9f8e7a265496e3f270b8d7 100644 --- a/test/jdk/java/net/httpclient/ThrowingSubscribersSanity.java +++ b/test/jdk/java/net/httpclient/ThrowingSubscribersSanity.java @@ -25,8 +25,8 @@ * @test * @summary Tests what happens when response body handlers and subscribers * throw unexpected exceptions. - * @library /lib/testlibrary http2/server - * @build jdk.testlibrary.SimpleSSLContext HttpServerAdapters + * @library /test/lib http2/server + * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * ReferenceTracker ThrowingSubscribersSanity AbstractThrowingSubscribers * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common diff --git a/test/jdk/java/net/httpclient/TimeoutBasic.java b/test/jdk/java/net/httpclient/TimeoutBasic.java index e1f7fa480756c21f49f141d3f6bfacb1fa27ee38..cdaedf062198b8519fa46015661d64205e37cd77 100644 --- a/test/jdk/java/net/httpclient/TimeoutBasic.java +++ b/test/jdk/java/net/httpclient/TimeoutBasic.java @@ -31,7 +31,7 @@ import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.net.http.HttpResponse.BodyHandlers; import java.net.http.HttpTimeoutException; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import javax.net.ServerSocketFactory; import javax.net.ssl.SSLContext; @@ -46,8 +46,8 @@ import static java.lang.System.out; /** * @test - * @library /lib/testlibrary - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @summary Basic tests for response timeouts * @run main/othervm TimeoutBasic */ diff --git a/test/jdk/java/net/httpclient/UnauthorizedTest.java b/test/jdk/java/net/httpclient/UnauthorizedTest.java index 5dfccc4f6b2228eb21f893c85d31aa72834181b3..7f183620de204d8d44fc4bb075adf445c150de43 100644 --- a/test/jdk/java/net/httpclient/UnauthorizedTest.java +++ b/test/jdk/java/net/httpclient/UnauthorizedTest.java @@ -35,9 +35,9 @@ * java.net.http/jdk.internal.net.http.hpack * java.logging * jdk.httpserver - * @library /lib/testlibrary /test/lib http2/server + * @library /test/lib http2/server * @build Http2TestServer - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @run testng/othervm * -Djdk.httpclient.HttpClient.log=headers * UnauthorizedTest @@ -46,7 +46,7 @@ import com.sun.net.httpserver.HttpServer; import com.sun.net.httpserver.HttpsConfigurator; import com.sun.net.httpserver.HttpsServer; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/UnknownBodyLengthTest.java b/test/jdk/java/net/httpclient/UnknownBodyLengthTest.java index 8962024d24b472749ca03044290cc3e18000b7d5..fd97843131e87d6c991c37f3f420fdbcb0f0e917 100644 --- a/test/jdk/java/net/httpclient/UnknownBodyLengthTest.java +++ b/test/jdk/java/net/httpclient/UnknownBodyLengthTest.java @@ -35,13 +35,13 @@ import javax.net.ssl.SSLParameters; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; /** * @test * @bug 8207966 - * @library /lib/testlibrary - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @run main/othervm -Djdk.tls.acknowledgeCloseNotify=true UnknownBodyLengthTest plain false * @run main/othervm -Djdk.tls.acknowledgeCloseNotify=true UnknownBodyLengthTest SSL false * @run main/othervm -Djdk.tls.acknowledgeCloseNotify=true UnknownBodyLengthTest plain true diff --git a/test/jdk/java/net/httpclient/dependent.policy b/test/jdk/java/net/httpclient/dependent.policy index 6a618eee712cec0bc77e899fa6f403632677e3ea..2396a118b205f3c6233aba1c60d042176f573cfa 100644 --- a/test/jdk/java/net/httpclient/dependent.policy +++ b/test/jdk/java/net/httpclient/dependent.policy @@ -21,10 +21,10 @@ // questions. // -// for JTwork/classes/0/lib/testlibrary/jdk/testlibrary/SimpleSSLContext.class -grant codeBase "file:${test.classes}/../../../../lib/testlibrary/-" { +// for JTwork/classes/0/test/lib/jdk/test/lib/net/SimpleSSLContext.class +grant codeBase "file:${test.classes}/../../../../test/lib/-" { permission java.util.PropertyPermission "test.src.path", "read"; - permission java.io.FilePermission "${test.src}/../../../lib/testlibrary/jdk/testlibrary/testkeys", "read"; + permission java.io.FilePermission "${test.src}/../../../../lib/jdk/test/lib/net/testkeys", "read"; }; // for JTwork//classes/0/java/net/httpclient/http2/server/* diff --git a/test/jdk/java/net/httpclient/http2/BadHeadersTest.java b/test/jdk/java/net/httpclient/http2/BadHeadersTest.java index 01d009269566896c34417073df3af1a0ed6a142b..2e4765fdf1b83bb648653d7511076ce9886afce9 100644 --- a/test/jdk/java/net/httpclient/http2/BadHeadersTest.java +++ b/test/jdk/java/net/httpclient/http2/BadHeadersTest.java @@ -27,9 +27,9 @@ * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame * java.net.http/jdk.internal.net.http.hpack - * @library /lib/testlibrary server + * @library /test/lib server * @build Http2TestServer - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @run testng/othervm -Djdk.internal.httpclient.debug=true BadHeadersTest */ @@ -38,7 +38,7 @@ import jdk.internal.net.http.frame.ContinuationFrame; import jdk.internal.net.http.frame.HeaderFrame; import jdk.internal.net.http.frame.HeadersFrame; import jdk.internal.net.http.frame.Http2Frame; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/http2/BasicTest.java b/test/jdk/java/net/httpclient/http2/BasicTest.java index 04f8ba9456c435e5636e29ec8ae44663d680c60b..00e4d80c12daffe5b168c5c2c9df7899c056ca29 100644 --- a/test/jdk/java/net/httpclient/http2/BasicTest.java +++ b/test/jdk/java/net/httpclient/http2/BasicTest.java @@ -24,8 +24,8 @@ /* * @test * @bug 8087112 - * @library /lib/testlibrary server - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib server + * @build jdk.test.lib.net.SimpleSSLContext * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame @@ -47,7 +47,7 @@ import java.util.concurrent.*; import java.util.Collections; import java.util.LinkedList; import java.util.List; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.Test; import static java.net.http.HttpClient.Version.HTTP_2; diff --git a/test/jdk/java/net/httpclient/http2/ContinuationFrameTest.java b/test/jdk/java/net/httpclient/http2/ContinuationFrameTest.java index ef13067f53be4e74267f2551820dc3f7fac0f5e1..ac692f478c83970362c3e131c31f2caebeec541c 100644 --- a/test/jdk/java/net/httpclient/http2/ContinuationFrameTest.java +++ b/test/jdk/java/net/httpclient/http2/ContinuationFrameTest.java @@ -28,9 +28,9 @@ * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame * java.net.http/jdk.internal.net.http.hpack - * @library /lib/testlibrary server + * @library /test/lib server * @build Http2TestServer - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @run testng/othervm ContinuationFrameTest */ @@ -55,7 +55,7 @@ import jdk.internal.net.http.frame.ContinuationFrame; import jdk.internal.net.http.frame.HeaderFrame; import jdk.internal.net.http.frame.HeadersFrame; import jdk.internal.net.http.frame.Http2Frame; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/http2/ErrorTest.java b/test/jdk/java/net/httpclient/http2/ErrorTest.java index 11ddc662614c757e0e13d43242d6eae37f43961f..54143e91bbce51ecf342e25c6dbca18cb3a0f34d 100644 --- a/test/jdk/java/net/httpclient/http2/ErrorTest.java +++ b/test/jdk/java/net/httpclient/http2/ErrorTest.java @@ -24,8 +24,8 @@ /* * @test * @bug 8157105 - * @library /lib/testlibrary server - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib server + * @build jdk.test.lib.net.SimpleSSLContext * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame @@ -46,7 +46,7 @@ import javax.net.ssl.SSLContext; import javax.net.ssl.SSLParameters; import java.util.concurrent.Executors; import java.util.concurrent.ExecutorService; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import static java.net.http.HttpClient.Version.HTTP_2; import org.testng.annotations.Test; diff --git a/test/jdk/java/net/httpclient/http2/FixedThreadPoolTest.java b/test/jdk/java/net/httpclient/http2/FixedThreadPoolTest.java index f154241a5b80a2603f6ed4c03f071f8399a861f0..1db21bf780509cb126922b2a0b8f0f426e652dc4 100644 --- a/test/jdk/java/net/httpclient/http2/FixedThreadPoolTest.java +++ b/test/jdk/java/net/httpclient/http2/FixedThreadPoolTest.java @@ -24,8 +24,8 @@ /* * @test * @bug 8087112 8177935 - * @library /lib/testlibrary server - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib server + * @build jdk.test.lib.net.SimpleSSLContext * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame @@ -40,7 +40,7 @@ import java.net.http.HttpResponse.BodyHandlers; import javax.net.ssl.*; import java.nio.file.*; import java.util.concurrent.*; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import static java.net.http.HttpClient.Version.HTTP_2; import org.testng.annotations.Test; diff --git a/test/jdk/java/net/httpclient/http2/ImplicitPushCancel.java b/test/jdk/java/net/httpclient/http2/ImplicitPushCancel.java index d0783461c83b120f7a61229ee3b725d3453a8123..69d9123203db781d712e31648abbe413c90646b5 100644 --- a/test/jdk/java/net/httpclient/http2/ImplicitPushCancel.java +++ b/test/jdk/java/net/httpclient/http2/ImplicitPushCancel.java @@ -23,8 +23,8 @@ /* * @test - * @library /lib/testlibrary server - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib server + * @build jdk.test.lib.net.SimpleSSLContext * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame diff --git a/test/jdk/java/net/httpclient/http2/ProxyTest2.java b/test/jdk/java/net/httpclient/http2/ProxyTest2.java index 1c6a3f0307203138745ec10b34556faa25e89ccd..41ab317d4c9f7c202f628ba299040154033333aa 100644 --- a/test/jdk/java/net/httpclient/http2/ProxyTest2.java +++ b/test/jdk/java/net/httpclient/http2/ProxyTest2.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -52,7 +52,7 @@ import javax.net.ssl.SSLSession; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import java.util.concurrent.*; /** @@ -61,12 +61,12 @@ import java.util.concurrent.*; * @summary Verifies that you can access an HTTP/2 server over HTTPS by * tunnelling through an HTTP/1.1 proxy. * @modules java.net.http - * @library /lib/testlibrary server + * @library /test/lib server * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame * java.net.http/jdk.internal.net.http.hpack - * @build jdk.testlibrary.SimpleSSLContext ProxyTest2 + * @build jdk.test.lib.net.SimpleSSLContext ProxyTest2 * @run main/othervm ProxyTest2 * @author danielfuchs */ diff --git a/test/jdk/java/net/httpclient/http2/RedirectTest.java b/test/jdk/java/net/httpclient/http2/RedirectTest.java index 41b08008baf291d8ab657e554c5cf45fd6c5a832..bf886502954d399572d242e0337defb55c44cd2d 100644 --- a/test/jdk/java/net/httpclient/http2/RedirectTest.java +++ b/test/jdk/java/net/httpclient/http2/RedirectTest.java @@ -24,8 +24,8 @@ /* * @test * @bug 8156514 - * @library /lib/testlibrary server - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib server + * @build jdk.test.lib.net.SimpleSSLContext * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame diff --git a/test/jdk/java/net/httpclient/http2/ServerPush.java b/test/jdk/java/net/httpclient/http2/ServerPush.java index 5b44dbf718fb643fb8e3cbb12efc16e33c4df37c..5652dae79c5730b03bebd618f8f78dfe957aeb33 100644 --- a/test/jdk/java/net/httpclient/http2/ServerPush.java +++ b/test/jdk/java/net/httpclient/http2/ServerPush.java @@ -24,8 +24,8 @@ /* * @test * @bug 8087112 8159814 - * @library /lib/testlibrary server - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib server + * @build jdk.test.lib.net.SimpleSSLContext * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame diff --git a/test/jdk/java/net/httpclient/http2/ServerPushWithDiffTypes.java b/test/jdk/java/net/httpclient/http2/ServerPushWithDiffTypes.java index 165ad825f63e4cca2b1263314950d75062e65c7e..8b5426d70d645b74ccd2eddacdf2bf2d7e265a61 100644 --- a/test/jdk/java/net/httpclient/http2/ServerPushWithDiffTypes.java +++ b/test/jdk/java/net/httpclient/http2/ServerPushWithDiffTypes.java @@ -23,8 +23,8 @@ /* * @test - * @library /lib/testlibrary server - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib server + * @build jdk.test.lib.net.SimpleSSLContext * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame diff --git a/test/jdk/java/net/httpclient/security/Driver.java b/test/jdk/java/net/httpclient/security/Driver.java index e09612361fb494215c27b76e13a1c85ba985efb0..29a8f7d222de44fc92a78fa698f981a5f80d62b0 100644 --- a/test/jdk/java/net/httpclient/security/Driver.java +++ b/test/jdk/java/net/httpclient/security/Driver.java @@ -24,12 +24,11 @@ /* * @test * @bug 8087112 - * @library /lib/testlibrary/ * @library /test/lib * @modules java.net.http * java.logging * jdk.httpserver - * @build jdk.testlibrary.SimpleSSLContext jdk.test.lib.Utils + * @build jdk.test.lib.net.SimpleSSLContext jdk.test.lib.Utils * @compile ../../../../com/sun/net/httpserver/LogFilter.java * @compile ../../../../com/sun/net/httpserver/FileServerHandler.java * @compile ../ProxyServer.java diff --git a/test/jdk/java/net/httpclient/security/Security.java b/test/jdk/java/net/httpclient/security/Security.java index be23f10bc86617b1cfc1f2de7efb1ace3710daa2..58594b55688e518b639260fcbabc6cbc41f77243 100644 --- a/test/jdk/java/net/httpclient/security/Security.java +++ b/test/jdk/java/net/httpclient/security/Security.java @@ -27,8 +27,8 @@ * @modules java.net.http * java.logging * jdk.httpserver - * @library /lib/testlibrary/ - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @compile ../../../../com/sun/net/httpserver/LogFilter.java * @compile ../../../../com/sun/net/httpserver/FileServerHandler.java * @compile ../ProxyServer.java diff --git a/test/jdk/java/net/httpclient/websocket/WSHandshakeExceptionTest.java b/test/jdk/java/net/httpclient/websocket/WSHandshakeExceptionTest.java index 2feac502b934fc6602d6db12d02ed08481da67e8..8702a49549fb656559cae4357abe6f2d636725ff 100644 --- a/test/jdk/java/net/httpclient/websocket/WSHandshakeExceptionTest.java +++ b/test/jdk/java/net/httpclient/websocket/WSHandshakeExceptionTest.java @@ -24,8 +24,8 @@ /* * @test * @summary Basic test for WebSocketHandshakeException - * @library /lib/testlibrary - * @build jdk.testlibrary.SimpleSSLContext + * @library /test/lib + * @build jdk.test.lib.net.SimpleSSLContext * @modules java.net.http * jdk.httpserver * @run testng/othervm -Djdk.internal.httpclient.debug=true WSHandshakeExceptionTest @@ -39,7 +39,7 @@ import java.net.InetAddress; import java.net.http.HttpClient; import java.net.http.WebSocket; import java.net.http.WebSocketHandshakeException; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.DataProvider; diff --git a/test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/AbstractSSLTubeTest.java b/test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/AbstractSSLTubeTest.java index 6eb6f2c231329f64d36907c08e8b4d6a4d20a24c..9b69588ce3f1fd0e5e1975cd877c0ae492a18c23 100644 --- a/test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/AbstractSSLTubeTest.java +++ b/test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/AbstractSSLTubeTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -28,22 +28,13 @@ import jdk.internal.net.http.common.SSLTube; import jdk.internal.net.http.common.Utils; import org.testng.annotations.Test; -import javax.net.ssl.KeyManagerFactory; import javax.net.ssl.SSLContext; import javax.net.ssl.SSLEngine; import javax.net.ssl.SSLParameters; -import javax.net.ssl.TrustManagerFactory; -import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.nio.ByteBuffer; -import java.security.KeyManagementException; -import java.security.KeyStore; -import java.security.KeyStoreException; -import java.security.NoSuchAlgorithmException; -import java.security.UnrecoverableKeyException; -import java.security.cert.CertificateException; import java.util.List; import java.util.StringTokenizer; import java.util.concurrent.CompletableFuture; @@ -244,76 +235,4 @@ public class AbstractSSLTubeTest extends AbstractRandomTest { engine.setUseClientMode(client); return engine; } - - /** - * Creates a simple usable SSLContext for SSLSocketFactory or a HttpsServer - * using either a given keystore or a default one in the test tree. - * - * Using this class with a security manager requires the following - * permissions to be granted: - * - * permission "java.util.PropertyPermission" "test.src.path", "read"; - * permission java.io.FilePermission "${test.src}/../../../../lib/testlibrary/jdk/testlibrary/testkeys", - * "read"; The exact path above depends on the location of the test. - */ - protected static class SimpleSSLContext { - - private final SSLContext ssl; - - /** - * Loads default keystore from SimpleSSLContext source directory - */ - public SimpleSSLContext() throws IOException { - String paths = System.getProperty("test.src.path"); - StringTokenizer st = new StringTokenizer(paths, File.pathSeparator); - boolean securityExceptions = false; - SSLContext sslContext = null; - while (st.hasMoreTokens()) { - String path = st.nextToken(); - try { - File f = new File(path, "../../../../lib/testlibrary/jdk/testlibrary/testkeys"); - if (f.exists()) { - try (FileInputStream fis = new FileInputStream(f)) { - sslContext = init(fis); - break; - } - } - } catch (SecurityException e) { - // catch and ignore because permission only required - // for one entry on path (at most) - securityExceptions = true; - } - } - if (securityExceptions) { - System.err.println("SecurityExceptions thrown on loading testkeys"); - } - ssl = sslContext; - } - - private SSLContext init(InputStream i) throws IOException { - try { - char[] passphrase = "passphrase".toCharArray(); - KeyStore ks = KeyStore.getInstance("JKS"); - ks.load(i, passphrase); - - KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509"); - kmf.init(ks, passphrase); - - TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509"); - tmf.init(ks); - - SSLContext ssl = SSLContext.getInstance("TLS"); - ssl.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null); - return ssl; - } catch (KeyManagementException | KeyStoreException | - UnrecoverableKeyException | CertificateException | - NoSuchAlgorithmException e) { - throw new RuntimeException(e.getMessage()); - } - } - - public SSLContext get() { - return ssl; - } - } } diff --git a/test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/FlowTest.java b/test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/FlowTest.java index e34a75229e19718c7562ddc46b208c2fa8fef4e6..e6188bf4bb8a8ce45d98e073b954b0f4753825b9 100644 --- a/test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/FlowTest.java +++ b/test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/FlowTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,8 +24,6 @@ package jdk.internal.net.http; import java.io.BufferedOutputStream; -import java.io.File; -import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; @@ -33,12 +31,6 @@ import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.Socket; import java.nio.ByteBuffer; -import java.security.KeyManagementException; -import java.security.KeyStore; -import java.security.KeyStoreException; -import java.security.NoSuchAlgorithmException; -import java.security.UnrecoverableKeyException; -import java.security.cert.CertificateException; import java.util.List; import java.util.Random; import java.util.StringTokenizer; @@ -53,9 +45,7 @@ import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.SubmissionPublisher; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicLong; -import javax.net.ssl.KeyManagerFactory; import javax.net.ssl.*; -import javax.net.ssl.TrustManagerFactory; import jdk.internal.net.http.common.Utils; import org.testng.annotations.Test; import jdk.internal.net.http.common.SSLFlowDelegate; @@ -467,80 +457,6 @@ public class FlowTest extends AbstractRandomTest { } } - /** - * Creates a simple usable SSLContext for SSLSocketFactory - * or a HttpsServer using either a given keystore or a default - * one in the test tree. - * <p> - * Using this class with a security manager requires the following - * permissions to be granted: - * <p> - * permission "java.util.PropertyPermission" "test.src.path", "read"; - * permission java.io.FilePermission - * "${test.src}/../../../../lib/testlibrary/jdk/testlibrary/testkeys", "read"; - * The exact path above depends on the location of the test. - */ - static class SimpleSSLContext { - - private final SSLContext ssl; - - /** - * Loads default keystore from SimpleSSLContext source directory - */ - public SimpleSSLContext() throws IOException { - String paths = System.getProperty("test.src.path"); - StringTokenizer st = new StringTokenizer(paths, File.pathSeparator); - boolean securityExceptions = false; - SSLContext sslContext = null; - while (st.hasMoreTokens()) { - String path = st.nextToken(); - try { - File f = new File(path, "../../../../lib/testlibrary/jdk/testlibrary/testkeys"); - if (f.exists()) { - try (FileInputStream fis = new FileInputStream(f)) { - sslContext = init(fis); - break; - } - } - } catch (SecurityException e) { - // catch and ignore because permission only required - // for one entry on path (at most) - securityExceptions = true; - } - } - if (securityExceptions) { - System.out.println("SecurityExceptions thrown on loading testkeys"); - } - ssl = sslContext; - } - - private SSLContext init(InputStream i) throws IOException { - try { - char[] passphrase = "passphrase".toCharArray(); - KeyStore ks = KeyStore.getInstance("JKS"); - ks.load(i, passphrase); - - KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509"); - kmf.init(ks, passphrase); - - TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509"); - tmf.init(ks); - - SSLContext ssl = SSLContext.getInstance("TLS"); - ssl.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null); - return ssl; - } catch (KeyManagementException | KeyStoreException | - UnrecoverableKeyException | CertificateException | - NoSuchAlgorithmException e) { - throw new RuntimeException(e.getMessage()); - } - } - - public SSLContext get() { - return ssl; - } - } - private static void sleep(int millis) { try { Thread.sleep(millis); diff --git a/test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/SimpleSSLContext.java b/test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/SimpleSSLContext.java new file mode 100644 index 0000000000000000000000000000000000000000..00ae3a0fa7dc908dd6c4cecd4e44dae70eda48a6 --- /dev/null +++ b/test/jdk/java/net/httpclient/whitebox/java.net.http/jdk/internal/net/http/SimpleSSLContext.java @@ -0,0 +1,112 @@ +/* + * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +package jdk.internal.net.http; + +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.security.KeyManagementException; +import java.security.KeyStore; +import java.security.KeyStoreException; +import java.security.NoSuchAlgorithmException; +import java.security.UnrecoverableKeyException; +import java.security.cert.CertificateException; +import java.util.StringTokenizer; + +import javax.net.ssl.KeyManagerFactory; +import javax.net.ssl.SSLContext; +import javax.net.ssl.TrustManagerFactory; + +/** + * Creates a simple usable SSLContext for SSLSocketFactory + * or a HttpsServer using a default keystore in the test tree. + * <p> + * Using this class with a security manager requires the following + * permissions to be granted: + * <p> + * permission "java.util.PropertyPermission" "test.src.path", "read"; + * permission java.io.FilePermission "/path/to/test/lib/jdk/test/lib/testkeys", "read"; + * The exact path above depends on the location of the test. + */ +public class SimpleSSLContext { + + private final SSLContext ssl; + + /** + * Loads default keystore from SimpleSSLContext source directory + */ + public SimpleSSLContext() throws IOException { + String paths = System.getProperty("test.src.path"); + StringTokenizer st = new StringTokenizer(paths, File.pathSeparator); + boolean securityExceptions = false; + SSLContext sslContext = null; + while (st.hasMoreTokens()) { + String path = st.nextToken(); + try { + File f = new File(path, "../../../../../lib/jdk/test/lib/net/testkeys"); + if (f.exists()) { + try (FileInputStream fis = new FileInputStream(f)) { + sslContext = init(fis); + break; + } + } + } catch (SecurityException e) { + // catch and ignore because permission only required + // for one entry on path (at most) + securityExceptions = true; + } + } + if (securityExceptions) { + System.out.println("SecurityExceptions thrown on loading testkeys"); + } + ssl = sslContext; + } + + private SSLContext init(InputStream i) throws IOException { + try { + char[] passphrase = "passphrase".toCharArray(); + KeyStore ks = KeyStore.getInstance("PKCS12"); + ks.load(i, passphrase); + + KeyManagerFactory kmf = KeyManagerFactory.getInstance("PKIX"); + kmf.init(ks, passphrase); + + TrustManagerFactory tmf = TrustManagerFactory.getInstance("PKIX"); + tmf.init(ks); + + SSLContext ssl = SSLContext.getInstance("TLS"); + ssl.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null); + return ssl; + } catch (KeyManagementException | KeyStoreException | + UnrecoverableKeyException | CertificateException | + NoSuchAlgorithmException e) { + throw new RuntimeException(e.getMessage()); + } + } + + public SSLContext get() { + return ssl; + } +} \ No newline at end of file diff --git a/test/jdk/javax/net/ssl/HttpsURLConnection/Equals.java b/test/jdk/javax/net/ssl/HttpsURLConnection/Equals.java index 38ee581bdbce90629e1b0a674deabcc62c4ac5bf..d36dfb2630eaea6def03b410be55f3ffec432775 100644 --- a/test/jdk/javax/net/ssl/HttpsURLConnection/Equals.java +++ b/test/jdk/javax/net/ssl/HttpsURLConnection/Equals.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -24,9 +24,9 @@ /** * @test * @bug 8055299 - * @library /lib/testlibrary + * @library /test/lib * @modules jdk.httpserver - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @run main/othervm -Djavax.net.debug=ssl,handshake,record Equals */ import com.sun.net.httpserver.*; @@ -34,7 +34,7 @@ import java.net.*; import java.io.*; import javax.net.ssl.*; import java.util.concurrent.*; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; public class Equals { diff --git a/test/jdk/sun/net/www/protocol/http/RedirectOnPost.java b/test/jdk/sun/net/www/protocol/http/RedirectOnPost.java index 8c485af01acde733594cad5bf22357a5c0a86e5c..2923c4807f54ec7e87b172834729f649a2765a46 100644 --- a/test/jdk/sun/net/www/protocol/http/RedirectOnPost.java +++ b/test/jdk/sun/net/www/protocol/http/RedirectOnPost.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,9 +23,9 @@ /** * @test - * @library /lib/testlibrary/ + * @library /test/lib * @modules jdk.httpserver - * @build jdk.testlibrary.SimpleSSLContext + * @build jdk.test.lib.net.SimpleSSLContext * @compile RedirectOnPost.java * @run main/othervm RedirectOnPost * @bug 8029127 @@ -38,7 +38,7 @@ import java.util.*; import com.sun.net.httpserver.*; import java.util.concurrent.*; import javax.net.ssl.*; -import jdk.testlibrary.SimpleSSLContext; +import jdk.test.lib.net.SimpleSSLContext; public class RedirectOnPost { diff --git a/test/jdk/lib/testlibrary/jdk/testlibrary/SimpleSSLContext.java b/test/lib/jdk/test/lib/net/SimpleSSLContext.java similarity index 82% rename from test/jdk/lib/testlibrary/jdk/testlibrary/SimpleSSLContext.java rename to test/lib/jdk/test/lib/net/SimpleSSLContext.java index 47143dc3b2bc71eb09e27afb24001c14c9c64e3b..0bfbb5fdc341d3349f7586493779a39e462bc138 100644 --- a/test/jdk/lib/testlibrary/jdk/testlibrary/SimpleSSLContext.java +++ b/test/lib/jdk/test/lib/net/SimpleSSLContext.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -21,12 +21,10 @@ * questions. */ -package jdk.testlibrary; +package jdk.test.lib.net; import java.util.*; -import java.util.concurrent.*; import java.io.*; -import java.net.*; import java.security.*; import java.security.cert.*; import javax.net.ssl.*; @@ -40,8 +38,7 @@ import javax.net.ssl.*; * permissions to be granted: * * permission "java.util.PropertyPermission" "test.src.path", "read"; - * permission java.io.FilePermission - * "${test.src}/../../../lib/testlibrary/jdk/testlibrary/testkeys", "read"; + * permission java.io.FilePermission "/path/to/test/lib/jdk/test/lib/testkeys", "read"; * The exact path above depends on the location of the test. */ public class SimpleSSLContext { @@ -63,7 +60,7 @@ public class SimpleSSLContext { while (st.hasMoreTokens()) { String path = st.nextToken(); try { - File f = new File(path, "jdk/testlibrary/testkeys"); + File f = new File(path, "jdk/test/lib/net/testkeys"); if (f.exists()) { try (FileInputStream fis = new FileInputStream(f)) { init(fis); @@ -98,7 +95,7 @@ public class SimpleSSLContext { * loads default keystore from given directory */ public SimpleSSLContext(String dir) throws IOException { - String file = dir+"/testkeys"; + String file = dir + "/testkeys"; try (FileInputStream fis = new FileInputStream(file)) { init(fis); } @@ -107,26 +104,20 @@ public class SimpleSSLContext { private void init(InputStream i) throws IOException { try { char[] passphrase = "passphrase".toCharArray(); - KeyStore ks = KeyStore.getInstance("JKS"); + KeyStore ks = KeyStore.getInstance("PKCS12"); ks.load(i, passphrase); - KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509"); + KeyManagerFactory kmf = KeyManagerFactory.getInstance("PKIX"); kmf.init(ks, passphrase); - TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509"); + TrustManagerFactory tmf = TrustManagerFactory.getInstance("PKIX"); tmf.init(ks); ssl = SSLContext.getInstance("TLS"); ssl.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null); - } catch (KeyManagementException e) { - throw new RuntimeException(e.getMessage()); - } catch (KeyStoreException e) { - throw new RuntimeException(e.getMessage()); - } catch (UnrecoverableKeyException e) { - throw new RuntimeException(e.getMessage()); - } catch (CertificateException e) { - throw new RuntimeException(e.getMessage()); - } catch (NoSuchAlgorithmException e) { + } catch (KeyManagementException | KeyStoreException | + UnrecoverableKeyException | CertificateException | + NoSuchAlgorithmException e) { throw new RuntimeException(e.getMessage()); } } diff --git a/test/jdk/lib/testlibrary/jdk/testlibrary/testkeys b/test/lib/jdk/test/lib/net/testkeys similarity index 100% rename from test/jdk/lib/testlibrary/jdk/testlibrary/testkeys rename to test/lib/jdk/test/lib/net/testkeys