< prev index next >

test/jdk/java/net/httpclient/MappingResponseSubscriber.java

Print this page
@@ -24,10 +24,11 @@
  /*
   * @test
   * @summary Tests mapped response subscriber
   * @library /test/lib /test/jdk/java/net/httpclient/lib
   * @build jdk.test.lib.net.SimpleSSLContext jdk.httpclient.test.lib.http2.Http2TestServer
+  *        jdk.httpclient.test.lib.common.TestServerConfigurator
   * @run testng/othervm
   *       -Djdk.internal.httpclient.debug=true
   *      MappingResponseSubscriber
   */
  

@@ -44,11 +45,10 @@
  import java.util.concurrent.Executors;
  import java.util.concurrent.Flow;
  import com.sun.net.httpserver.HttpExchange;
  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 java.net.http.HttpClient;
  import java.net.http.HttpHeaders;
  import java.net.http.HttpRequest;
  import java.net.http.HttpResponse;

@@ -57,10 +57,11 @@
  import java.net.http.HttpResponse.BodySubscribers;
  import  java.net.http.HttpResponse.BodySubscriber;
  import java.util.function.Function;
  import javax.net.ssl.SSLContext;
  
+ import jdk.httpclient.test.lib.common.TestServerConfigurator;
  import jdk.internal.net.http.common.OperationTrackers.Tracker;
  import jdk.httpclient.test.lib.http2.Http2TestServer;
  import jdk.httpclient.test.lib.http2.Http2TestExchange;
  import jdk.httpclient.test.lib.http2.Http2Handler;
  import jdk.test.lib.net.SimpleSSLContext;

@@ -228,11 +229,11 @@
          httpTestServer.createContext("/http1/chunk", h1_chunkHandler);
          httpURI_fixed = "http://" + serverAuthority(httpTestServer) + "/http1/fixed";
          httpURI_chunk = "http://" + serverAuthority(httpTestServer) + "/http1/chunk";
  
          httpsTestServer = HttpsServer.create(sa, 0);
-         httpsTestServer.setHttpsConfigurator(new HttpsConfigurator(sslContext));
+         httpsTestServer.setHttpsConfigurator(new TestServerConfigurator(sa.getAddress(), sslContext));
          httpsTestServer.createContext("/https1/fixed", h1_fixedLengthHandler);
          httpsTestServer.createContext("/https1/chunk", h1_chunkHandler);
          httpsURI_fixed = "https://" + serverAuthority(httpsTestServer) + "/https1/fixed";
          httpsURI_chunk = "https://" + serverAuthority(httpsTestServer) + "/https1/chunk";
  
< prev index next >