Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8343074: test/jdk/com/sun/net/httpserver/docs/test1/largefile.txt could be generated #23401

Closed
wants to merge 13 commits into from
Closed
5 changes: 3 additions & 2 deletions test/jdk/com/sun/net/httpserver/SelCacheTest.java
Original file line number Diff line number Diff line change
@@ -25,8 +25,7 @@
* @test
* @bug 6270015
* @library /test/lib
* @build jdk.test.lib.Asserts
* jdk.test.lib.Utils
* @build jdk.test.lib.Utils
* jdk.test.lib.net.SimpleSSLContext
* jdk.test.lib.net.URIBuilder
* @run main/othervm -Dsun.net.httpserver.selCacheTimeout=2 SelCacheTest
@@ -74,6 +73,8 @@ public static void main(String[] args) throws Exception {
throw new RuntimeException("should not be httpsserver");
}
s2 = HttpsServer.create(addr, 0);
// Assert that both files share the same parent and can be served from the same `FileServerHandler`
assert smallFilePath.getParent().equals(largeFilePath.getParent());
HttpHandler h = new FileServerHandler(smallFilePath.getParent().toString());
HttpContext c1 = s1.createContext("/", h);
HttpContext c2 = s2.createContext("/", h);
5 changes: 3 additions & 2 deletions test/jdk/com/sun/net/httpserver/Test1.java
Original file line number Diff line number Diff line change
@@ -25,8 +25,7 @@
* @test
* @bug 6270015
* @library /test/lib
* @build jdk.test.lib.Asserts
* jdk.test.lib.Utils
* @build jdk.test.lib.Utils
* jdk.test.lib.net.SimpleSSLContext
* jdk.test.lib.net.URIBuilder
* @run main/othervm Test1
@@ -84,6 +83,8 @@ public static void main (String[] args) throws Exception {
throw new RuntimeException ("should not be httpsserver");
}
s2 = HttpsServer.create (addr, 0);
// Assert that both files share the same parent and can be served from the same `FileServerHandler`
assert smallFilePath.getParent().equals(largeFilePath.getParent());
HttpHandler h = new FileServerHandler (smallFilePath.getParent().toString());
HttpContext c1 = s1.createContext ("/", h);
HttpContext c2 = s2.createContext ("/", h);
5 changes: 3 additions & 2 deletions test/jdk/com/sun/net/httpserver/Test12.java
Original file line number Diff line number Diff line change
@@ -25,8 +25,7 @@
* @test
* @bug 6270015
* @library /test/lib
* @build jdk.test.lib.Asserts
* jdk.test.lib.Utils
* @build jdk.test.lib.Utils
* jdk.test.lib.net.SimpleSSLContext
* jdk.test.lib.net.URIBuilder
* @run main/othervm Test12
@@ -73,6 +72,8 @@ public static void main (String[] args) throws Exception {
InetSocketAddress addr = new InetSocketAddress(loopback, 0);
s1 = HttpServer.create (addr, 0);
s2 = HttpsServer.create (addr, 0);
// Assert that both files share the same parent and can be served from the same `FileServerHandler`
assert smallFilePath.getParent().equals(largeFilePath.getParent());
HttpHandler h = new FileServerHandler(smallFilePath.getParent().toString());
HttpContext c1 = s1.createContext ("/", h);
HttpContext c2 = s2.createContext ("/", h);
3 changes: 1 addition & 2 deletions test/jdk/com/sun/net/httpserver/Test13.java
Original file line number Diff line number Diff line change
@@ -25,8 +25,7 @@
* @test
* @bug 6270015
* @library /test/lib
* @build jdk.test.lib.Asserts
* jdk.test.lib.Utils
* @build jdk.test.lib.Utils
* jdk.test.lib.net.SimpleSSLContext
* jdk.test.lib.net.URIBuilder
* @run main/othervm Test13
5 changes: 3 additions & 2 deletions test/jdk/com/sun/net/httpserver/Test9.java
Original file line number Diff line number Diff line change
@@ -25,8 +25,7 @@
* @test
* @bug 6270015
* @library /test/lib
* @build jdk.test.lib.Asserts
* jdk.test.lib.Utils
* @build jdk.test.lib.Utils
* jdk.test.lib.net.SimpleSSLContext
* jdk.test.lib.net.URIBuilder
* @run main/othervm Test9
@@ -70,6 +69,8 @@ public static void main (String[] args) throws Exception {
InetSocketAddress addr = new InetSocketAddress(loopback, 0);
s1 = HttpServer.create (addr, 0);
s2 = HttpsServer.create (addr, 0);
// Assert that both files share the same parent and can be served from the same `FileServerHandler`
assert smallFilePath.getParent().equals(largeFilePath.getParent());
HttpHandler h = new FileServerHandler (smallFilePath.getParent().toString());
HttpContext c1 = s1.createContext ("/", h);
HttpContext c2 = s2.createContext ("/", h);
5 changes: 3 additions & 2 deletions test/jdk/com/sun/net/httpserver/Test9a.java
Original file line number Diff line number Diff line change
@@ -25,8 +25,7 @@
* @test
* @bug 6270015
* @library /test/lib
* @build jdk.test.lib.Asserts
* jdk.test.lib.Utils
* @build jdk.test.lib.Utils
* jdk.test.lib.net.SimpleSSLContext
* jdk.test.lib.net.URIBuilder
* @run main/othervm Test9a
@@ -69,6 +68,8 @@ public static void main (String[] args) throws Exception {
InetAddress loopback = InetAddress.getLoopbackAddress();
InetSocketAddress addr = new InetSocketAddress(loopback, 0);
server = HttpsServer.create (addr, 0);
// Assert that both files share the same parent and can be served from the same `FileServerHandler`
assert smallFilePath.getParent().equals(largeFilePath.getParent());
HttpHandler h = new FileServerHandler (smallFilePath.getParent().toString());
HttpContext c1 = server.createContext ("/", h);
executor = Executors.newCachedThreadPool();
1 change: 0 additions & 1 deletion test/jdk/java/net/httpclient/http2/BasicTest.java
Original file line number Diff line number Diff line change
@@ -29,7 +29,6 @@
* @build jdk.httpclient.test.lib.http2.Http2TestServer
* jdk.httpclient.test.lib.http2.Http2TestExchange
* jdk.httpclient.test.lib.http2.Http2EchoHandler
* jdk.test.lib.Asserts
* jdk.test.lib.Utils
* jdk.test.lib.net.SimpleSSLContext
* @run testng/othervm -Djdk.httpclient.HttpClient.log=ssl,requests,responses,errors BasicTest