< prev index next >

test/jdk/java/net/httpclient/HttpSlowServerTest.java

Print this page
@@ -18,13 +18,12 @@
   *
   * 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.
   */
- import com.sun.net.httpserver.HttpServer;
- import com.sun.net.httpserver.HttpsConfigurator;
  import com.sun.net.httpserver.HttpsServer;
+ import jdk.httpclient.test.lib.common.TestServerConfigurator;
  import jdk.test.lib.net.SimpleSSLContext;
  
  import javax.net.ssl.SSLContext;
  import java.io.IOException;
  import java.io.InputStream;

@@ -49,21 +48,21 @@
  import java.util.concurrent.LinkedBlockingQueue;
  import java.util.concurrent.ThreadPoolExecutor;
  import java.util.concurrent.TimeUnit;
  import java.util.concurrent.atomic.AtomicLong;
  import jdk.httpclient.test.lib.common.HttpServerAdapters;
- import jdk.httpclient.test.lib.http2.Http2TestServer;
  import static java.net.http.HttpClient.Version.HTTP_1_1;
  import static java.net.http.HttpClient.Version.HTTP_2;
  
  /**
   * @test
   * @summary This test verifies that the HttpClient works correctly when connected to a
   *          slow server.
   * @library /test/lib /test/jdk/java/net/httpclient/lib
   * @build jdk.httpclient.test.lib.common.HttpServerAdapters jdk.test.lib.net.SimpleSSLContext
   *        DigestEchoServer HttpSlowServerTest
+  *        jdk.httpclient.test.lib.common.TestServerConfigurator
   * @run main/othervm -Dtest.requiresHost=true
   *                   -Djdk.httpclient.HttpClient.log=headers
   *                   -Djdk.internal.httpclient.debug=false
   *                   HttpSlowServerTest
   *

@@ -136,11 +135,11 @@
  
  
              // HTTPS/1.1
              HttpsServer sserver1 = HttpsServer.create(sa, 100);
              sserver1.setExecutor(executor);
-             sserver1.setHttpsConfigurator(new HttpsConfigurator(context));
+             sserver1.setHttpsConfigurator(new TestServerConfigurator(sa.getAddress(), context));
              https1Server = HttpTestServer.of(sserver1);
              https1Server.addHandler(new HttpTestSlowHandler(), "/HttpSlowServerTest/https1/");
              https1Server.start();
              https1URI = new URI("https://" + https1Server.serverAuthority() + "/HttpSlowServerTest/https1/");
  
< prev index next >