< prev index next >

test/jdk/java/net/httpclient/AsFileDownloadTest.java

Print this page
*** 22,11 ***
   */
  
  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.io.IOException;
  import java.io.InputStream;
  import java.io.OutputStream;
  import java.io.UncheckedIOException;
--- 22,10 ---

*** 51,10 ***
--- 50,11 ---
  import java.util.Map;
  import javax.net.ssl.SSLContext;
  import jdk.test.lib.net.SimpleSSLContext;
  import jdk.test.lib.util.FileUtils;
  import jdk.httpclient.test.lib.common.HttpServerAdapters;
+ import jdk.httpclient.test.lib.common.TestServerConfigurator;
  import jdk.httpclient.test.lib.http2.Http2TestServer;
  import jdk.httpclient.test.lib.http2.Http2TestExchange;
  import jdk.httpclient.test.lib.http2.Http2Handler;
  import org.testng.annotations.AfterTest;
  import org.testng.annotations.BeforeTest;

*** 73,10 ***
--- 73,11 ---
   * @summary Basic test for ofFileDownload
   * @bug 8196965 8302475
   * @library /test/lib /test/jdk/java/net/httpclient/lib
   * @build jdk.httpclient.test.lib.http2.Http2TestServer jdk.test.lib.net.SimpleSSLContext
   *        jdk.test.lib.Platform jdk.test.lib.util.FileUtils
+  *        jdk.httpclient.test.lib.common.TestServerConfigurator
   * @run testng/othervm AsFileDownloadTest
   * @run testng/othervm/java.security.policy=AsFileDownloadTest.policy AsFileDownloadTest
   */
  public class AsFileDownloadTest {
  

*** 325,11 ***
          httpTestServer = HttpServer.create(sa, 0);
          httpTestServer.createContext("/http1/afdt", new Http1FileDispoHandler());
          httpURI = "http://" + serverAuthority(httpTestServer) + "/http1/afdt";
  
          httpsTestServer = HttpsServer.create(sa, 0);
!         httpsTestServer.setHttpsConfigurator(new HttpsConfigurator(sslContext));
          httpsTestServer.createContext("/https1/afdt", new Http1FileDispoHandler());
          httpsURI = "https://" + serverAuthority(httpsTestServer) + "/https1/afdt";
  
          http2TestServer = new Http2TestServer("localhost", false, 0);
          http2TestServer.addHandler(new Http2FileDispoHandler(), "/http2/afdt");
--- 326,11 ---
          httpTestServer = HttpServer.create(sa, 0);
          httpTestServer.createContext("/http1/afdt", new Http1FileDispoHandler());
          httpURI = "http://" + serverAuthority(httpTestServer) + "/http1/afdt";
  
          httpsTestServer = HttpsServer.create(sa, 0);
!         httpsTestServer.setHttpsConfigurator(new TestServerConfigurator(sa.getAddress(), sslContext));
          httpsTestServer.createContext("/https1/afdt", new Http1FileDispoHandler());
          httpsURI = "https://" + serverAuthority(httpsTestServer) + "/https1/afdt";
  
          http2TestServer = new Http2TestServer("localhost", false, 0);
          http2TestServer.addHandler(new Http2FileDispoHandler(), "/http2/afdt");
< prev index next >