- 
    Task 
- 
    Resolution: Fixed
- 
     P4 P4
- 
    None
- 
        b13
| Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build | 
|---|---|---|---|---|---|---|
| JDK-8327877 | 17.0.12-oracle | Deepak Damodaran | P4 | Resolved | Fixed | b01 | 
| JDK-8329711 | 17.0.12 | Goetz Lindenmaier | P4 | Resolved | Fixed | b01 | 
InetSocketAddress sa = new InetSocketAddress(InetAddress.getLoopbackAddress(), 0);
httpTestServer = HttpTestServer.of(HttpServer.create(sa, 0));
...
HttpsServer httpsServer = HttpsServer.create(sa, 0);
httpsServer.setHttpsConfigurator(new HttpsConfigurator(sslContext));
httpsTestServer = HttpTestServer.of(httpsServer);
...
http2TestServer = HttpTestServer.of(new Http2TestServer("localhost", false, 0));
...
https2TestServer = HttpTestServer.of(new Http2TestServer("localhost", true, sslContext));
It would be good to have a convenience API to replace these calls with simpler calls and reduce the boilerplate code in these tests. The new APIs could be of the form:
httpTestServer = HttpTestServer.create(HTTP_1_1);
...
httpsTestServer = HttpTestServer.create(HTTP_1_1, sslContext);
...
http2TestServer = HttpTestServer.create(HTTP_2);
...
https2TestServer = HttpTestServer.create(HTTP_2, sslContext);
The existing test server API will continue to exist. The proposed new APIs are for the default common cases that are used in most of these tests.
- backported by
- 
                    JDK-8327877 Introduce convenience test library APIs for creating test servers for tests in test/jdk/java/net/httpclient -           
- Resolved
 
-         
- 
                    JDK-8329711 Introduce convenience test library APIs for creating test servers for tests in test/jdk/java/net/httpclient -           
- Resolved
 
-         
- relates to
- 
                    JDK-8305095 Update java/net/httpclient/CustomRequestPublisher.java to use new HttpTestServer factory methods -           
- Resolved
 
-         
- links to
- 
                     Commit
        openjdk/jdk17u-dev/e913fa70 Commit
        openjdk/jdk17u-dev/e913fa70
- 
                     Commit
        openjdk/jdk/72de24e5 Commit
        openjdk/jdk/72de24e5
- 
                     Review
        openjdk/jdk17u-dev/2350 Review
        openjdk/jdk17u-dev/2350
- 
                     Review
        openjdk/jdk/12808 Review
        openjdk/jdk/12808