< prev index next >

test/jdk/java/net/httpclient/LargeResponseTest.java

Print this page
*** 18,13 ***
   *
   * 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.test.lib.net.SimpleSSLContext;
  
  import javax.net.ssl.SSLContext;
  import java.io.IOException;
  import java.io.InputStream;
--- 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.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;

*** 36,11 ***
  import java.net.SocketAddress;
  import java.net.URI;
  import java.net.http.HttpClient;
  import java.net.http.HttpRequest;
  import java.net.http.HttpResponse;
- import java.nio.charset.StandardCharsets;
  import java.time.Duration;
  import java.util.List;
  import java.util.Set;
  import java.util.concurrent.CompletableFuture;
  import java.util.concurrent.CopyOnWriteArrayList;
--- 35,10 ---

*** 49,11 ***
  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
--- 47,10 ---

*** 62,10 ***
--- 59,11 ---
   *          sends large amount of data. Note that this test will pass even without
   *          the fix for JDK-8231449, which is unfortunate.
   * @library /test/lib /test/jdk/java/net/httpclient/lib
   * @build jdk.httpclient.test.lib.common.HttpServerAdapters
   *        jdk.test.lib.net.SimpleSSLContext DigestEchoServer
+  *        jdk.httpclient.test.lib.common.TestServerConfigurator
   * @run main/othervm -Dtest.requiresHost=true
   *                   -Djdk.httpclient.HttpClient.log=headers
   *                   -Djdk.internal.httpclient.debug=true
   *                   LargeResponseTest
   *

*** 134,11 ***
  
  
              // HTTPS/1.1
              HttpsServer sserver1 = HttpsServer.create(sa, 100);
              sserver1.setExecutor(executor);
!             sserver1.setHttpsConfigurator(new HttpsConfigurator(context));
              https1Server = HttpTestServer.of(sserver1);
              https1Server.addHandler(new HttpTestLargeHandler(), "/LargeResponseTest/https1/");
              https1Server.start();
              https1URI = new URI("https://" + https1Server.serverAuthority() + "/LargeResponseTest/https1/");
  
--- 132,11 ---
  
  
              // HTTPS/1.1
              HttpsServer sserver1 = HttpsServer.create(sa, 100);
              sserver1.setExecutor(executor);
!             sserver1.setHttpsConfigurator(new TestServerConfigurator(sa.getAddress(), context));
              https1Server = HttpTestServer.of(sserver1);
              https1Server.addHandler(new HttpTestLargeHandler(), "/LargeResponseTest/https1/");
              https1Server.start();
              https1URI = new URI("https://" + https1Server.serverAuthority() + "/LargeResponseTest/https1/");
  
< prev index next >