8295944: Move the Http2TestServer and related classes into a package of its own

Reviewed-by: dfuchs
This commit is contained in:
Jaikiran Pai 2023-01-25 13:38:02 +00:00
parent c8ad600064
commit 8a47429dc0
135 changed files with 759 additions and 950 deletions

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -24,10 +24,10 @@
/** /**
* @test * @test
* @bug 8278312 * @bug 8278312
* @library /test/lib /test/jdk/java/net/httpclient /test/jdk/java/net/httpclient/http2/server * @library /test/lib /test/jdk/java/net/httpclient /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters Http2Handler * @build jdk.test.lib.net.SimpleSSLContext jdk.httpclient.test.lib.common.HttpServerAdapters
* jdk.test.lib.net.IPSupport * jdk.httpclient.test.lib.http2.Http2TestServer
* Http2TestExchange * jdk.test.lib.net.IPSupport
* *
* @modules java.net.http/jdk.internal.net.http.common * @modules java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame * java.net.http/jdk.internal.net.http.frame
@ -52,6 +52,8 @@ import javax.net.ssl.*;
import jdk.test.lib.net.SimpleSSLContext; import jdk.test.lib.net.SimpleSSLContext;
import jdk.test.lib.net.URIBuilder; import jdk.test.lib.net.URIBuilder;
import jdk.test.lib.net.IPSupport; import jdk.test.lib.net.IPSupport;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
/* /*
* Will fail if the testkeys file belonging to SimpleSSLContext * Will fail if the testkeys file belonging to SimpleSSLContext

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -27,17 +27,10 @@
* when a 'Connection reset by peer' exception is raised * when a 'Connection reset by peer' exception is raised
* during the handshake. * during the handshake.
* @bug 8217094 * @bug 8217094
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters DigestEchoServer * @build jdk.test.lib.net.SimpleSSLContext DigestEchoServer
* jdk.httpclient.test.lib.common.HttpServerAdapters
* ALPNFailureTest ALPNProxyFailureTest * ALPNFailureTest ALPNProxyFailureTest
* @modules java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* java.logging
* java.base/sun.net.www.http
* java.base/sun.net.www
* java.base/sun.net
* @build ALPNFailureTest
* @run main/othervm -Djdk.internal.httpclient.debug=true -Dtest.nolinger=true ALPNProxyFailureTest HTTP_1_1 * @run main/othervm -Djdk.internal.httpclient.debug=true -Dtest.nolinger=true ALPNProxyFailureTest HTTP_1_1
* @run main/othervm -Dtest.nolinger=true ALPNProxyFailureTest HTTP_2 * @run main/othervm -Dtest.nolinger=true ALPNProxyFailureTest HTTP_2
*/ */

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -35,6 +35,9 @@ import com.sun.net.httpserver.HttpsConfigurator;
import com.sun.net.httpserver.HttpsServer; import com.sun.net.httpserver.HttpsServer;
import java.net.http.HttpClient; import java.net.http.HttpClient;
import javax.net.ssl.SSLContext; import javax.net.ssl.SSLContext;
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; import jdk.test.lib.net.SimpleSSLContext;
import org.testng.annotations.AfterTest; import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest; import org.testng.annotations.BeforeTest;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -72,6 +72,8 @@ import java.util.function.Consumer;
import java.util.function.Supplier; import java.util.function.Supplier;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream; import java.util.stream.Stream;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import static java.lang.String.format; import static java.lang.String.format;
import static java.lang.System.out; import static java.lang.System.out;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -30,14 +30,11 @@
* Concrete tests that extend this abstract class will need to include * Concrete tests that extend this abstract class will need to include
* the following jtreg tags: * the following jtreg tags:
* *
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * @build jdk.test.lib.net.SimpleSSLContext
* ReferenceTracker AbstractThrowingPushPromises * ReferenceTracker AbstractThrowingPushPromises
* jdk.httpclient.test.lib.common.HttpServerAdapters
* <concrete-class-name> * <concrete-class-name>
* @modules java.base/sun.net.www.http
* java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* @run testng/othervm -Djdk.internal.httpclient.debug=true <concrete-class-name> * @run testng/othervm -Djdk.internal.httpclient.debug=true <concrete-class-name>
*/ */
@ -90,6 +87,8 @@ import java.util.function.Predicate;
import java.util.function.Supplier; import java.util.function.Supplier;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream; import java.util.stream.Stream;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import static java.lang.System.out; import static java.lang.System.out;
import static java.lang.System.err; import static java.lang.System.err;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -71,6 +71,8 @@ import java.util.function.Predicate;
import java.util.function.Supplier; import java.util.function.Supplier;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream; import java.util.stream.Stream;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import static java.lang.System.out; import static java.lang.System.out;
import static java.lang.String.format; import static java.lang.String.format;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -24,13 +24,9 @@
/* /*
* @test * @test
* @bug 8252374 * @bug 8252374
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * @build jdk.test.lib.net.SimpleSSLContext jdk.httpclient.test.lib.common.HttpServerAdapters
* ReferenceTracker AggregateRequestBodyTest * ReferenceTracker AggregateRequestBodyTest
* @modules java.base/sun.net.www.http
* java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* @run testng/othervm -Djdk.internal.httpclient.debug=true * @run testng/othervm -Djdk.internal.httpclient.debug=true
* -Djdk.httpclient.HttpClient.log=requests,responses,errors * -Djdk.httpclient.HttpClient.log=requests,responses,errors
* AggregateRequestBodyTest * AggregateRequestBodyTest
@ -70,6 +66,8 @@ import java.util.function.Supplier;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.LongStream; import java.util.stream.LongStream;
import java.util.stream.Stream; import java.util.stream.Stream;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import javax.net.ssl.SSLContext; import javax.net.ssl.SSLContext;
import com.sun.net.httpserver.HttpServer; import com.sun.net.httpserver.HttpServer;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,17 +25,9 @@
* @test * @test
* @summary Basic test for ofFileDownload * @summary Basic test for ofFileDownload
* @bug 8196965 * @bug 8196965
* @modules java.base/sun.net.www.http * @library /test/lib /test/jdk/java/net/httpclient/lib
* java.net.http/jdk.internal.net.http.common * @build jdk.httpclient.test.lib.http2.Http2TestServer jdk.test.lib.net.SimpleSSLContext
* java.net.http/jdk.internal.net.http.frame * jdk.test.lib.Platform jdk.test.lib.util.FileUtils
* java.net.http/jdk.internal.net.http.hpack
* java.logging
* jdk.httpserver
* @library /test/lib http2/server
* @build Http2TestServer
* @build jdk.test.lib.net.SimpleSSLContext
* @build jdk.test.lib.Platform
* @build jdk.test.lib.util.FileUtils
* @run testng/othervm AsFileDownloadTest * @run testng/othervm AsFileDownloadTest
* @run testng/othervm/java.security.policy=AsFileDownloadTest.policy AsFileDownloadTest * @run testng/othervm/java.security.policy=AsFileDownloadTest.policy AsFileDownloadTest
*/ */
@ -71,6 +63,10 @@ import java.util.Map;
import javax.net.ssl.SSLContext; import javax.net.ssl.SSLContext;
import jdk.test.lib.net.SimpleSSLContext; import jdk.test.lib.net.SimpleSSLContext;
import jdk.test.lib.util.FileUtils; import jdk.test.lib.util.FileUtils;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
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.AfterTest;
import org.testng.annotations.BeforeTest; import org.testng.annotations.BeforeTest;
import org.testng.annotations.DataProvider; import org.testng.annotations.DataProvider;

View File

@ -1,5 +1,5 @@
// //
// Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. // Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
// //
// This code is free software; you can redistribute it and/or modify it // This code is free software; you can redistribute it and/or modify it
@ -27,8 +27,8 @@ grant codeBase "file:${test.classes}/../../../../test/lib/-" {
permission java.io.FilePermission "${test.src}/../../../../lib/jdk/test/lib/net/testkeys", "read"; permission java.io.FilePermission "${test.src}/../../../../lib/jdk/test/lib/net/testkeys", "read";
}; };
// for JTwork//classes/0/java/net/httpclient/http2/server/* // for classes in JTwork//classes/0/test/jdk/java/net/httpclient/lib/
grant codeBase "file:${test.classes}/../../../../java/net/httpclient/http2/server/*" { grant codeBase "file:${test.classes}/../../../../test/jdk/java/net/httpclient/lib/-" {
permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.net.http.common"; permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.net.http.common";
permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.net.http.frame"; permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.net.http.frame";
permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.net.http.hpack"; permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.net.http.hpack";

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,15 +26,9 @@
* @bug 8277969 * @bug 8277969
* @summary Test for edge case where the executor is not accepting * @summary Test for edge case where the executor is not accepting
* new tasks while the client is still running * new tasks while the client is still running
* @modules java.base/sun.net.www.http * @library /test/lib /test/jdk/java/net/httpclient/lib
* java.net.http/jdk.internal.net.http.common * @build jdk.httpclient.test.lib.http2.Http2TestServer jdk.test.lib.net.SimpleSSLContext
* java.net.http/jdk.internal.net.http.frame * ReferenceTracker
* java.net.http/jdk.internal.net.http.hpack
* java.logging
* jdk.httpserver
* @library /test/lib http2/server
* @build Http2TestServer
* @build jdk.test.lib.net.SimpleSSLContext ReferenceTracker
* @run testng/othervm * @run testng/othervm
* -Djdk.internal.httpclient.debug=true * -Djdk.internal.httpclient.debug=true
* -Djdk.httpclient.HttpClient.log=trace,headers,requests * -Djdk.httpclient.HttpClient.log=trace,headers,requests
@ -69,6 +63,8 @@ import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicLong;
import java.util.function.Function; import java.util.function.Function;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import javax.net.ssl.SSLContext; import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLHandshakeException; import javax.net.ssl.SSLHandshakeException;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -31,6 +31,8 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.concurrent.*; import java.util.concurrent.*;
import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicLong;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import com.sun.net.httpserver.HttpServer; import com.sun.net.httpserver.HttpServer;
import com.sun.net.httpserver.HttpsConfigurator; import com.sun.net.httpserver.HttpsConfigurator;
@ -46,15 +48,9 @@ import javax.net.ssl.SSLContext;
* @test * @test
* @bug 8232853 * @bug 8232853
* @summary AuthenticationFilter.Cache::remove may throw ConcurrentModificationException * @summary AuthenticationFilter.Cache::remove may throw ConcurrentModificationException
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters DigestEchoServer HttpRedirectTest * @build jdk.httpclient.test.lib.common.HttpServerAdapters jdk.test.lib.net.SimpleSSLContext
* @modules java.net.http/jdk.internal.net.http.common * DigestEchoServer
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* java.logging
* java.base/sun.net.www.http
* java.base/sun.net.www
* java.base/sun.net
* @run testng/othervm -Dtest.requiresHost=true * @run testng/othervm -Dtest.requiresHost=true
* -Djdk.httpclient.HttpClient.log=headers * -Djdk.httpclient.HttpClient.log=headers
* -Djdk.internal.httpclient.debug=false * -Djdk.internal.httpclient.debug=false

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -24,15 +24,8 @@
/* /*
* @test * @test
* @summary Basic test for redirect and redirect policies * @summary Basic test for redirect and redirect policies
* @modules java.base/sun.net.www.http * @library /test/lib /test/jdk/java/net/httpclient/lib
* java.net.http/jdk.internal.net.http.common * @build jdk.httpclient.test.lib.common.HttpServerAdapters jdk.test.lib.net.SimpleSSLContext
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* java.logging
* jdk.httpserver
* @library /test/lib http2/server
* @build Http2TestServer
* @build jdk.test.lib.net.SimpleSSLContext
* @run testng/othervm * @run testng/othervm
* -Djdk.httpclient.HttpClient.log=trace,headers,requests * -Djdk.httpclient.HttpClient.log=trace,headers,requests
* BasicRedirectTest * BasicRedirectTest
@ -51,6 +44,8 @@ import java.net.http.HttpClient;
import java.net.http.HttpClient.Redirect; import java.net.http.HttpClient.Redirect;
import java.net.http.HttpRequest; import java.net.http.HttpRequest;
import java.net.http.HttpResponse; import java.net.http.HttpResponse;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import java.net.http.HttpResponse.BodyHandlers; import java.net.http.HttpResponse.BodyHandlers;
import javax.net.ssl.SSLContext; import javax.net.ssl.SSLContext;
import jdk.test.lib.net.SimpleSSLContext; import jdk.test.lib.net.SimpleSSLContext;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,14 +25,10 @@
* @test * @test
* @bug 8245462 8229822 8254786 8297075 8297149 8298340 * @bug 8245462 8229822 8254786 8297075 8297149 8298340
* @summary Tests cancelling the request. * @summary Tests cancelling the request.
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @key randomness * @key randomness
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * @build jdk.httpclient.test.lib.common.HttpServerAdapters jdk.test.lib.net.SimpleSSLContext
* ReferenceTracker CancelRequestTest * ReferenceTracker CancelRequestTest
* @modules java.base/sun.net.www.http
* java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* @run testng/othervm -Djdk.internal.httpclient.debug=true * @run testng/othervm -Djdk.internal.httpclient.debug=true
* -Djdk.httpclient.enableAllMethodRetry=true * -Djdk.httpclient.enableAllMethodRetry=true
* CancelRequestTest * CancelRequestTest
@ -85,6 +81,8 @@ import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream; import java.util.stream.Stream;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import static java.lang.System.arraycopy; import static java.lang.System.arraycopy;
import static java.lang.System.out; import static java.lang.System.out;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,13 +26,9 @@
* @bug 8294916 8297075 8297149 * @bug 8294916 8297075 8297149
* @summary Tests that closing a streaming handler (ofInputStream()/ofLines()) * @summary Tests that closing a streaming handler (ofInputStream()/ofLines())
* without reading all the bytes unregisters the underlying subscriber. * without reading all the bytes unregisters the underlying subscriber.
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * @build jdk.httpclient.test.lib.common.HttpServerAdapters jdk.test.lib.net.SimpleSSLContext
* ReferenceTracker CancelStreamedBodyTest * ReferenceTracker CancelStreamedBodyTest
* @modules java.base/sun.net.www.http
* java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* @run testng/othervm -Djdk.internal.httpclient.debug=true * @run testng/othervm -Djdk.internal.httpclient.debug=true
* CancelStreamedBodyTest * CancelStreamedBodyTest
*/ */
@ -82,6 +78,8 @@ import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream; import java.util.stream.Stream;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import static java.lang.System.arraycopy; import static java.lang.System.arraycopy;
import static java.lang.System.out; import static java.lang.System.out;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,15 +26,8 @@
* @bug 8195823 * @bug 8195823
* @summary Buffers given to response body subscribers should not contain * @summary Buffers given to response body subscribers should not contain
* unprocessed HTTP data * unprocessed HTTP data
* @modules java.base/sun.net.www.http * @library /test/lib /test/jdk/java/net/httpclient/lib
* java.net.http/jdk.internal.net.http.common * @build jdk.httpclient.test.lib.http2.Http2TestServer jdk.test.lib.net.SimpleSSLContext
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* java.logging
* jdk.httpserver
* @library /test/lib http2/server
* @build Http2TestServer
* @build jdk.test.lib.net.SimpleSSLContext
* @run testng/othervm * @run testng/othervm
* -Djdk.httpclient.HttpClient.log=headers,errors,channel * -Djdk.httpclient.HttpClient.log=headers,errors,channel
* ConcurrentResponses * ConcurrentResponses
@ -67,6 +60,10 @@ import java.net.http.HttpResponse.BodyHandler;
import java.net.http.HttpResponse.BodyHandlers; import java.net.http.HttpResponse.BodyHandlers;
import java.net.http.HttpResponse.BodySubscriber; import java.net.http.HttpResponse.BodySubscriber;
import java.net.http.HttpResponse.BodySubscribers; import java.net.http.HttpResponse.BodySubscribers;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
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; import jdk.test.lib.net.SimpleSSLContext;
import org.testng.annotations.AfterTest; import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest; import org.testng.annotations.BeforeTest;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,15 +25,8 @@
* @test * @test
* @bug 8199851 * @bug 8199851
* @summary Test for multiple vs single cookie header for HTTP/2 vs HTTP/1.1 * @summary Test for multiple vs single cookie header for HTTP/2 vs HTTP/1.1
* @modules java.base/sun.net.www.http * @library /test/lib /test/jdk/java/net/httpclient/lib
* java.net.http/jdk.internal.net.http.common * @build jdk.httpclient.test.lib.common.HttpServerAdapters jdk.test.lib.net.SimpleSSLContext
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* java.logging
* jdk.httpserver
* @library /test/lib http2/server
* @build Http2TestServer
* @build jdk.test.lib.net.SimpleSSLContext
* @run testng/othervm * @run testng/othervm
* -Djdk.tls.acknowledgeCloseNotify=true * -Djdk.tls.acknowledgeCloseNotify=true
* -Djdk.httpclient.HttpClient.log=trace,headers,requests * -Djdk.httpclient.HttpClient.log=trace,headers,requests
@ -82,6 +75,8 @@ import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicLong;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream; import java.util.stream.Stream;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import static java.lang.System.out; import static java.lang.System.out;
import static java.nio.charset.StandardCharsets.UTF_8; import static java.nio.charset.StandardCharsets.UTF_8;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -24,15 +24,8 @@
/* /*
* @test * @test
* @summary Checks correct handling of Publishers that call onComplete without demand * @summary Checks correct handling of Publishers that call onComplete without demand
* @modules java.base/sun.net.www.http * @library /test/lib /test/jdk/java/net/httpclient/lib
* java.net.http/jdk.internal.net.http.common * @build jdk.httpclient.test.lib.http2.Http2TestServer jdk.test.lib.net.SimpleSSLContext
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* java.logging
* jdk.httpserver
* @library /test/lib http2/server
* @build Http2TestServer
* @build jdk.test.lib.net.SimpleSSLContext
* @run testng/othervm CustomRequestPublisher * @run testng/othervm CustomRequestPublisher
*/ */
@ -62,6 +55,9 @@ import javax.net.ssl.SSLSession;
import java.net.http.HttpClient; import java.net.http.HttpClient;
import java.net.http.HttpRequest; import java.net.http.HttpRequest;
import java.net.http.HttpResponse; import java.net.http.HttpResponse;
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; import jdk.test.lib.net.SimpleSSLContext;
import org.testng.annotations.AfterTest; import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest; import org.testng.annotations.BeforeTest;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -24,12 +24,8 @@
/* /*
* @test * @test
* @summary Tests response body subscribers's onComplete is not invoked before onSubscribe * @summary Tests response body subscribers's onComplete is not invoked before onSubscribe
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext * @build jdk.test.lib.net.SimpleSSLContext jdk.httpclient.test.lib.http2.Http2TestServer
* @modules java.base/sun.net.www.http
* java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* @run testng/othervm CustomResponseSubscriber * @run testng/othervm CustomResponseSubscriber
*/ */
@ -56,6 +52,9 @@ import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandler; import java.net.http.HttpResponse.BodyHandler;
import java.net.http.HttpResponse.BodySubscriber; import java.net.http.HttpResponse.BodySubscriber;
import java.net.http.HttpResponse.BodySubscribers; import java.net.http.HttpResponse.BodySubscribers;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import jdk.httpclient.test.lib.http2.Http2TestExchange;
import jdk.httpclient.test.lib.http2.Http2Handler;
import javax.net.ssl.SSLContext; import javax.net.ssl.SSLContext;
import jdk.test.lib.net.SimpleSSLContext; import jdk.test.lib.net.SimpleSSLContext;
import org.testng.annotations.AfterTest; import org.testng.annotations.AfterTest;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,12 +26,9 @@
* @summary Verify that dependent synchronous actions added before the CF * @summary Verify that dependent synchronous actions added before the CF
* completes are executed either asynchronously in an executor when the * completes are executed either asynchronously in an executor when the
* CF later completes, or in the user thread that joins. * CF later completes, or in the user thread that joins.
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters DependentActionsTest * @build jdk.httpclient.test.lib.common.HttpServerAdapters jdk.test.lib.net.SimpleSSLContext
* @modules java.base/sun.net.www.http * DependentActionsTest
* java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* @run testng/othervm -Djdk.internal.httpclient.debug=true DependentActionsTest * @run testng/othervm -Djdk.internal.httpclient.debug=true DependentActionsTest
* @run testng/othervm/java.security.policy=dependent.policy * @run testng/othervm/java.security.policy=dependent.policy
* -Djdk.internal.httpclient.debug=true DependentActionsTest * -Djdk.internal.httpclient.debug=true DependentActionsTest
@ -86,6 +83,8 @@ import java.util.function.Predicate;
import java.util.function.Supplier; import java.util.function.Supplier;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream; import java.util.stream.Stream;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import static java.lang.System.out; import static java.lang.System.out;
import static java.lang.String.format; import static java.lang.String.format;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,12 +26,9 @@
* @summary Verify that dependent synchronous actions added before the promise CF * @summary Verify that dependent synchronous actions added before the promise CF
* completes are executed either asynchronously in an executor when the * completes are executed either asynchronously in an executor when the
* CF later completes, or in the user thread that joins. * CF later completes, or in the user thread that joins.
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters DependentPromiseActionsTest * @build jdk.httpclient.test.lib.common.HttpServerAdapters jdk.test.lib.net.SimpleSSLContext
* @modules java.base/sun.net.www.http * DependentPromiseActionsTest
* java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* @run testng/othervm -Djdk.internal.httpclient.debug=true DependentPromiseActionsTest * @run testng/othervm -Djdk.internal.httpclient.debug=true DependentPromiseActionsTest
* @run testng/othervm/java.security.policy=dependent.policy * @run testng/othervm/java.security.policy=dependent.policy
* -Djdk.internal.httpclient.debug=true DependentPromiseActionsTest * -Djdk.internal.httpclient.debug=true DependentPromiseActionsTest
@ -84,6 +81,8 @@ import java.util.function.Function;
import java.util.function.Supplier; import java.util.function.Supplier;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream; import java.util.stream.Stream;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import static java.lang.System.err; import static java.lang.System.err;
import static java.lang.System.out; import static java.lang.System.out;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -52,6 +52,7 @@ import java.util.concurrent.atomic.AtomicLong;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream; import java.util.stream.Stream;
import javax.net.ssl.SSLContext; import javax.net.ssl.SSLContext;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.test.lib.net.SimpleSSLContext; import jdk.test.lib.net.SimpleSSLContext;
import sun.net.NetProperties; import sun.net.NetProperties;
import sun.net.www.HeaderParser; import sun.net.www.HeaderParser;
@ -64,16 +65,9 @@ import static java.lang.String.format;
* @summary this test verifies that a client may provides authorization * @summary this test verifies that a client may provides authorization
* headers directly when connecting with a server. * headers directly when connecting with a server.
* @bug 8087112 * @bug 8087112
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters DigestEchoServer * @build jdk.httpclient.test.lib.common.HttpServerAdapters jdk.test.lib.net.SimpleSSLContext
* ReferenceTracker DigestEchoClient * DigestEchoServer ReferenceTracker DigestEchoClient
* @modules java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* java.logging
* java.base/sun.net.www.http
* java.base/sun.net.www
* java.base/sun.net
* @run main/othervm DigestEchoClient * @run main/othervm DigestEchoClient
* @run main/othervm -Djdk.http.auth.proxying.disabledSchemes= * @run main/othervm -Djdk.http.auth.proxying.disabledSchemes=
* -Djdk.http.auth.tunneling.disabledSchemes= * -Djdk.http.auth.tunneling.disabledSchemes=

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,16 +26,10 @@
* @bug 8087112 * @bug 8087112
* @summary this test verifies that a client may provides authorization * @summary this test verifies that a client may provides authorization
* headers directly when connecting with a server over SSL. * headers directly when connecting with a server over SSL.
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext DigestEchoServer * @build jdk.test.lib.net.SimpleSSLContext DigestEchoServer
* DigestEchoClient ReferenceTracker DigestEchoClientSSL * DigestEchoClient ReferenceTracker DigestEchoClientSSL
* @modules java.net.http/jdk.internal.net.http.common * jdk.httpclient.test.lib.common.HttpServerAdapters
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* java.logging
* java.base/sun.net.www.http
* java.base/sun.net.www
* java.base/sun.net
* @run main/othervm/timeout=300 * @run main/othervm/timeout=300
* DigestEchoClientSSL SSL * DigestEchoClientSSL SSL
* @run main/othervm/timeout=300 * @run main/othervm/timeout=300

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -69,6 +69,8 @@ import java.util.stream.Stream;
import javax.net.ssl.SSLContext; import javax.net.ssl.SSLContext;
import sun.net.www.HeaderParser; import sun.net.www.HeaderParser;
import java.net.http.HttpClient.Version; import java.net.http.HttpClient.Version;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
/** /**
* A simple HTTP server that supports Basic or Digest authentication. * A simple HTTP server that supports Basic or Digest authentication.

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,12 +26,9 @@
* @bug 8199683 * @bug 8199683
* @summary Tests that escaped characters in URI are correctly * @summary Tests that escaped characters in URI are correctly
* handled (not re-escaped and not unescaped) * handled (not re-escaped and not unescaped)
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters EncodedCharsInURI * @build jdk.httpclient.test.lib.common.HttpServerAdapters jdk.test.lib.net.SimpleSSLContext
* @modules java.base/sun.net.www.http * EncodedCharsInURI
* java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* @run testng/othervm * @run testng/othervm
* -Djdk.tls.acknowledgeCloseNotify=true * -Djdk.tls.acknowledgeCloseNotify=true
* -Djdk.internal.httpclient.debug=true * -Djdk.internal.httpclient.debug=true
@ -76,6 +73,8 @@ import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.Executor; import java.util.concurrent.Executor;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicLong;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import static java.lang.String.format; import static java.lang.String.format;
import static java.lang.System.in; import static java.lang.System.in;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,15 +25,8 @@
* @test * @test
* @summary Preserve URI component escaped octets when converting to HTTP headers * @summary Preserve URI component escaped octets when converting to HTTP headers
* @bug 8198716 * @bug 8198716
* @modules java.base/sun.net.www.http * @library /test/lib /test/jdk/java/net/httpclient/lib
* java.net.http/jdk.internal.net.http.common * @build jdk.httpclient.test.lib.http2.Http2TestServer jdk.test.lib.net.SimpleSSLContext
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* java.logging
* jdk.httpserver
* @library /test/lib http2/server
* @build Http2TestServer
* @build jdk.test.lib.net.SimpleSSLContext
* @run testng/othervm * @run testng/othervm
* -Djdk.httpclient.HttpClient.log=reqeusts,headers * -Djdk.httpclient.HttpClient.log=reqeusts,headers
* EscapedOctetsInURI * EscapedOctetsInURI
@ -58,6 +51,9 @@ import java.net.http.HttpResponse.BodyHandlers;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
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; import jdk.test.lib.net.SimpleSSLContext;
import org.testng.annotations.AfterTest; import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest; import org.testng.annotations.BeforeTest;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,15 +26,9 @@
* @bug 8277969 * @bug 8277969
* @summary Test for edge case where the executor is not accepting * @summary Test for edge case where the executor is not accepting
* new tasks while the client is still running * new tasks while the client is still running
* @modules java.base/sun.net.www.http * @library /test/lib /test/jdk/java/net/httpclient/lib
* java.net.http/jdk.internal.net.http.common * @build jdk.httpclient.test.lib.http2.Http2TestServer jdk.test.lib.net.SimpleSSLContext
* java.net.http/jdk.internal.net.http.frame * ReferenceTracker
* java.net.http/jdk.internal.net.http.hpack
* java.logging
* jdk.httpserver
* @library /test/lib http2/server
* @build Http2TestServer
* @build jdk.test.lib.net.SimpleSSLContext ReferenceTracker
* @run testng/othervm * @run testng/othervm
* -Djdk.internal.httpclient.debug=true * -Djdk.internal.httpclient.debug=true
* -Djdk.httpclient.HttpClient.log=trace,headers,requests * -Djdk.httpclient.HttpClient.log=trace,headers,requests
@ -66,6 +60,8 @@ import java.util.concurrent.Executors;
import java.util.concurrent.RejectedExecutionException; import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicLong;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import javax.net.ssl.SSLContext; import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLHandshakeException; import javax.net.ssl.SSLHandshakeException;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -29,13 +29,8 @@
* a response code of 417 Expectation Failed, that the client does not hang * a response code of 417 Expectation Failed, that the client does not hang
* indefinitely and closes the connection. * indefinitely and closes the connection.
* @bug 8286171 * @bug 8286171
* @modules java.base/sun.net.www.http * @library /test/lib /test/jdk/java/net/httpclient/lib
* java.net.http/jdk.internal.net.http.common * @build jdk.httpclient.test.lib.common.HttpServerAdapters
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* jdk.httpserver
* @library /test/lib http2/server
* @compile HttpServerAdapters.java
* @run testng/othervm ExpectContinueTest * @run testng/othervm ExpectContinueTest
*/ */
@ -67,6 +62,8 @@ import java.net.http.HttpRequest;
import java.net.http.HttpResponse; import java.net.http.HttpResponse;
import java.util.StringTokenizer; import java.util.StringTokenizer;
import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletableFuture;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import static java.nio.charset.StandardCharsets.UTF_8; import static java.nio.charset.StandardCharsets.UTF_8;
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertEquals;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -29,14 +29,9 @@
* policy 1: no custom permission * policy 1: no custom permission
* policy 2: custom permission for test classes * policy 2: custom permission for test classes
* policy 3: custom permission for test classes and httpclient * policy 3: custom permission for test classes and httpclient
* @modules java.base/sun.net.www.http * @library /test/lib /test/jdk/java/net/httpclient/lib
* java.net.http/jdk.internal.net.http.common * @build jdk.httpclient.test.lib.common.HttpServerAdapters jdk.test.lib.net.SimpleSSLContext
* java.net.http/jdk.internal.net.http.frame * SecureZipFSProvider
* java.net.http/jdk.internal.net.http.hpack
* jdk.httpserver
* @library /test/lib ../http2/server
* @compile ../HttpServerAdapters.java
* @build jdk.test.lib.net.SimpleSSLContext SecureZipFSProvider
* @run testng/othervm/java.security.policy=FilePublisherPermsTest1.policy FilePublisherPermsTest * @run testng/othervm/java.security.policy=FilePublisherPermsTest1.policy FilePublisherPermsTest
* @run testng/othervm/java.security.policy=FilePublisherPermsTest2.policy FilePublisherPermsTest * @run testng/othervm/java.security.policy=FilePublisherPermsTest2.policy FilePublisherPermsTest
* @run testng/othervm/java.security.policy=FilePublisherPermsTest3.policy FilePublisherPermsTest * @run testng/othervm/java.security.policy=FilePublisherPermsTest3.policy FilePublisherPermsTest
@ -71,6 +66,8 @@ import java.nio.file.Files;
import java.nio.file.Path; import java.nio.file.Path;
import java.security.*; import java.security.*;
import java.util.Map; import java.util.Map;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import static java.lang.System.out; import static java.lang.System.out;
import static java.net.http.HttpClient.Builder.NO_PROXY; import static java.net.http.HttpClient.Builder.NO_PROXY;

View File

@ -1,5 +1,5 @@
// //
// Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. // Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
// //
// This code is free software; you can redistribute it and/or modify it // This code is free software; you can redistribute it and/or modify it
@ -27,8 +27,8 @@ grant codeBase "file:${test.classes}/../../../../../test/lib/-" {
permission java.io.FilePermission "${test.src}/../../../../../lib/jdk/test/lib/net/testkeys", "read"; permission java.io.FilePermission "${test.src}/../../../../../lib/jdk/test/lib/net/testkeys", "read";
}; };
// for JTwork/classes/0/java/net/httpclient/http2/server/* // for jdk/httpclient/test/lib/* classes
grant codeBase "file:${test.classes}/../../../../../java/net/httpclient/http2/server/*" { grant codeBase "file:${test.classes}/../../../../../test/jdk/java/net/httpclient/lib/-" {
permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.net.http.common"; permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.net.http.common";
permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.net.http.frame"; permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.net.http.frame";
permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.net.http.hpack"; permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.net.http.hpack";

View File

@ -1,5 +1,5 @@
// //
// Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. // Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
// //
// This code is free software; you can redistribute it and/or modify it // This code is free software; you can redistribute it and/or modify it
@ -29,8 +29,8 @@ grant codeBase "file:${test.classes}/../../../../../test/lib/-" {
permission java.io.FilePermission "${test.src}/../../../../../lib/jdk/test/lib/net/testkeys", "read"; permission java.io.FilePermission "${test.src}/../../../../../lib/jdk/test/lib/net/testkeys", "read";
}; };
// for JTwork/classes/0/java/net/httpclient/http2/server/* // for jdk/httpclient/test/lib/* classes
grant codeBase "file:${test.classes}/../../../../../java/net/httpclient/http2/server/*" { grant codeBase "file:${test.classes}/../../../../../test/jdk/java/net/httpclient/lib/-" {
permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.net.http.common"; permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.net.http.common";
permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.net.http.frame"; permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.net.http.frame";
permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.net.http.hpack"; permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.net.http.hpack";

View File

@ -1,5 +1,5 @@
// //
// Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. // Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
// //
// This code is free software; you can redistribute it and/or modify it // This code is free software; you can redistribute it and/or modify it
@ -34,8 +34,8 @@ grant codeBase "file:${test.classes}/../../../../../test/lib/-" {
permission java.io.FilePermission "${test.src}/../../../../../lib/jdk/test/lib/net/testkeys", "read"; permission java.io.FilePermission "${test.src}/../../../../../lib/jdk/test/lib/net/testkeys", "read";
}; };
// for JTwork/classes/0/java/net/httpclient/http2/server/* // for jdk/httpclient/test/lib/* classes
grant codeBase "file:${test.classes}/../../../../../java/net/httpclient/http2/server/*" { grant codeBase "file:${test.classes}/../../../../../test/jdk/java/net/httpclient/lib/-" {
permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.net.http.common"; permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.net.http.common";
permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.net.http.frame"; permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.net.http.frame";
permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.net.http.hpack"; permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.net.http.hpack";

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,14 +26,9 @@
* @bug 8235459 * @bug 8235459
* @summary Confirm that HttpRequest.BodyPublishers#ofFile(Path) * @summary Confirm that HttpRequest.BodyPublishers#ofFile(Path)
* assumes the default file system * assumes the default file system
* @modules java.base/sun.net.www.http * @library /test/lib /test/jdk/java/net/httpclient/lib
* java.net.http/jdk.internal.net.http.common * @build jdk.httpclient.test.lib.common.HttpServerAdapters
* java.net.http/jdk.internal.net.http.frame * jdk.test.lib.net.SimpleSSLContext
* java.net.http/jdk.internal.net.http.hpack
* jdk.httpserver
* @library /test/lib ../http2/server
* @compile ../HttpServerAdapters.java
* @build jdk.test.lib.net.SimpleSSLContext
* @run testng/othervm FilePublisherTest * @run testng/othervm FilePublisherTest
* @run testng/othervm/java.security.policy=FilePublisherTest.policy FilePublisherTest * @run testng/othervm/java.security.policy=FilePublisherTest.policy FilePublisherTest
*/ */
@ -63,6 +58,8 @@ import java.nio.file.FileSystems;
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.Path; import java.nio.file.Path;
import java.util.Map; import java.util.Map;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import static java.lang.System.out; import static java.lang.System.out;
import static java.net.http.HttpClient.Builder.NO_PROXY; import static java.net.http.HttpClient.Builder.NO_PROXY;

View File

@ -1,5 +1,5 @@
// //
// Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. // Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
// //
// This code is free software; you can redistribute it and/or modify it // This code is free software; you can redistribute it and/or modify it
@ -28,7 +28,7 @@ grant codeBase "file:${test.classes}/../../../../../test/lib/-" {
}; };
// for JTwork/classes/0/java/net/httpclient/http2/server/* // for JTwork/classes/0/java/net/httpclient/http2/server/*
grant codeBase "file:${test.classes}/../../../../../java/net/httpclient/http2/server/*" { grant codeBase "file:${test.classes}/../../../../../test/jdk/java/net/httpclient/lib/-" {
permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.net.http.common"; permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.net.http.common";
permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.net.http.frame"; permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.net.http.frame";
permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.net.http.hpack"; permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.net.http.hpack";

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -43,6 +43,10 @@ import com.sun.net.httpserver.HttpsServer;
import java.net.http.HttpClient; import java.net.http.HttpClient;
import java.net.http.HttpRequest; import java.net.http.HttpRequest;
import java.net.http.HttpResponse; import java.net.http.HttpResponse;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
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; import jdk.test.lib.net.SimpleSSLContext;
import org.testng.annotations.AfterTest; import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest; import org.testng.annotations.BeforeTest;
@ -61,15 +65,9 @@ import static org.testng.Assert.fail;
/* /*
* @test * @test
* @summary Basic tests for Flow adapter Publishers * @summary Basic tests for Flow adapter Publishers
* @modules java.base/sun.net.www.http * @library /test/lib /test/jdk/java/net/httpclient/lib
* java.net.http/jdk.internal.net.http.common * @build jdk.httpclient.test.lib.http2.Http2TestServer
* java.net.http/jdk.internal.net.http.frame * jdk.test.lib.net.SimpleSSLContext
* java.net.http/jdk.internal.net.http.hpack
* java.logging
* jdk.httpserver
* @library /test/lib http2/server
* @build Http2TestServer
* @build jdk.test.lib.net.SimpleSSLContext
* @run testng/othervm FlowAdapterPublisherTest * @run testng/othervm FlowAdapterPublisherTest
*/ */

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -48,6 +48,10 @@ import java.net.http.HttpRequest.BodyPublishers;
import java.net.http.HttpResponse; import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandlers; import java.net.http.HttpResponse.BodyHandlers;
import java.net.http.HttpResponse.BodySubscribers; import java.net.http.HttpResponse.BodySubscribers;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
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; import jdk.test.lib.net.SimpleSSLContext;
import org.testng.annotations.AfterTest; import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest; import org.testng.annotations.BeforeTest;
@ -62,15 +66,8 @@ import static org.testng.Assert.assertTrue;
/* /*
* @test * @test
* @summary Basic tests for Flow adapter Subscribers * @summary Basic tests for Flow adapter Subscribers
* @modules java.base/sun.net.www.http * @library /test/lib /test/jdk/java/net/httpclient/lib
* java.net.http/jdk.internal.net.http.common * @build jdk.httpclient.test.lib.http2.Http2TestServer jdk.test.lib.net.SimpleSSLContext
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* java.logging
* jdk.httpserver
* @library /test/lib http2/server
* @build Http2TestServer
* @build jdk.test.lib.net.SimpleSSLContext
* @run testng/othervm -Djdk.internal.httpclient.debug=true FlowAdapterSubscriberTest * @run testng/othervm -Djdk.internal.httpclient.debug=true FlowAdapterSubscriberTest
*/ */

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,18 +25,9 @@
* @test * @test
* @summary checks that receiving 403 for a HEAD request after * @summary checks that receiving 403 for a HEAD request after
* 401/407 doesn't cause any unexpected behavior. * 401/407 doesn't cause any unexpected behavior.
* @modules java.base/sun.net.www.http * @library /test/lib /test/jdk/java/net/httpclient/lib
* java.net.http/jdk.internal.net.http.common * @build DigestEchoServer ForbiddenHeadTest jdk.httpclient.test.lib.common.HttpServerAdapters
* java.net.http/jdk.internal.net.http.frame * jdk.test.lib.net.SimpleSSLContext
* java.net.http/jdk.internal.net.http.hpack
* java.logging
* jdk.httpserver
* java.base/sun.net.www.http
* java.base/sun.net.www
* java.base/sun.net
* @library /test/lib http2/server
* @build HttpServerAdapters DigestEchoServer Http2TestServer ForbiddenHeadTest
* @build jdk.test.lib.net.SimpleSSLContext
* @run testng/othervm * @run testng/othervm
* -Djdk.http.auth.tunneling.disabledSchemes * -Djdk.http.auth.tunneling.disabledSchemes
* -Djdk.httpclient.HttpClient.log=headers,requests * -Djdk.httpclient.HttpClient.log=headers,requests
@ -84,6 +75,8 @@ import java.util.concurrent.Executor;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.atomic.AtomicReference;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import static java.lang.System.err; import static java.lang.System.err;
import static java.lang.System.out; import static java.lang.System.out;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,12 +25,8 @@
* @test * @test
* @bug 8217264 * @bug 8217264
* @summary Tests that you can map an InputStream to a GZIPInputStream * @summary Tests that you can map an InputStream to a GZIPInputStream
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext * @build jdk.test.lib.net.SimpleSSLContext jdk.httpclient.test.lib.common.HttpServerAdapters
* @modules java.base/sun.net.www.http
* java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* @run testng/othervm GZIPInputStreamTest * @run testng/othervm GZIPInputStreamTest
*/ */
@ -65,6 +61,8 @@ import java.util.function.Function;
import java.util.function.Supplier; import java.util.function.Supplier;
import java.util.zip.GZIPInputStream; import java.util.zip.GZIPInputStream;
import java.util.zip.GZIPOutputStream; import java.util.zip.GZIPOutputStream;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import static java.lang.System.out; import static java.lang.System.out;
import static java.nio.charset.StandardCharsets.UTF_8; import static java.nio.charset.StandardCharsets.UTF_8;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,15 +25,8 @@
* @test * @test
* @bug 8203433 8276559 * @bug 8203433 8276559
* @summary (httpclient) Add tests for HEAD and 304 responses. * @summary (httpclient) Add tests for HEAD and 304 responses.
* @modules java.base/sun.net.www.http * @library /test/lib /test/jdk/java/net/httpclient/lib
* java.net.http/jdk.internal.net.http.common * @build jdk.httpclient.test.lib.http2.Http2TestServer jdk.test.lib.net.SimpleSSLContext
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* java.logging
* jdk.httpserver
* @library /test/lib http2/server
* @build Http2TestServer
* @build jdk.test.lib.net.SimpleSSLContext
* @run testng/othervm * @run testng/othervm
* -Djdk.httpclient.HttpClient.log=trace,headers,requests * -Djdk.httpclient.HttpClient.log=trace,headers,requests
* HeadTest * HeadTest
@ -59,6 +52,8 @@ import java.net.http.HttpClient.Redirect;
import java.net.http.HttpRequest; import java.net.http.HttpRequest;
import java.net.http.HttpResponse; import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandlers; import java.net.http.HttpResponse.BodyHandlers;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import static java.lang.System.out; import static java.lang.System.out;
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertEquals;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -47,21 +47,18 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
import java.util.concurrent.Future; import java.util.concurrent.Future;
import java.util.function.Predicate; import java.util.function.Predicate;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
/* /*
* @test * @test
* @summary Tests HttpClient usage when configured with a local address to bind * @summary Tests HttpClient usage when configured with a local address to bind
* to, when sending requests * to, when sending requests
* @bug 8209137 * @bug 8209137
* @modules jdk.httpserver * @library /test/lib /test/jdk/java/net/httpclient/lib
* java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.base/sun.net.www.http
* java.net.http/jdk.internal.net.http.hpack
* *
* @library /test/lib http2/server * @build jdk.test.lib.net.SimpleSSLContext jdk.test.lib.net.IPSupport
* * jdk.httpclient.test.lib.common.HttpServerAdapters
* @build jdk.test.lib.net.SimpleSSLContext jdk.test.lib.net.IPSupport HttpServerAdapters
* *
* @run testng/othervm * @run testng/othervm
* -Djdk.httpclient.HttpClient.log=frames,ssl,requests,responses,errors * -Djdk.httpclient.HttpClient.log=frames,ssl,requests,responses,errors

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -57,20 +57,16 @@ import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicLong;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
/** /**
* @test * @test
* @bug 8232625 * @bug 8232625
* @summary This test verifies that the HttpClient works correctly when redirecting a post request. * @summary This test verifies that the HttpClient works correctly when redirecting a post request.
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters DigestEchoServer HttpRedirectTest * @build jdk.test.lib.net.SimpleSSLContext DigestEchoServer HttpRedirectTest
* @modules java.net.http/jdk.internal.net.http.common * jdk.httpclient.test.lib.common.HttpServerAdapters
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* java.logging
* java.base/sun.net.www.http
* java.base/sun.net.www
* java.base/sun.net
* @run testng/othervm -Dtest.requiresHost=true * @run testng/othervm -Dtest.requiresHost=true
* -Djdk.httpclient.HttpClient.log=headers * -Djdk.httpclient.HttpClient.log=headers
* -Djdk.internal.httpclient.debug=false * -Djdk.internal.httpclient.debug=false

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -50,20 +50,16 @@ import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicLong;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
/** /**
* @test * @test
* @summary This test verifies that the HttpClient works correctly when connected to a * @summary This test verifies that the HttpClient works correctly when connected to a
* slow server. * slow server.
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters DigestEchoServer HttpSlowServerTest * @build jdk.httpclient.test.lib.common.HttpServerAdapters jdk.test.lib.net.SimpleSSLContext
* @modules java.net.http/jdk.internal.net.http.common * DigestEchoServer HttpSlowServerTest
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* java.logging
* java.base/sun.net.www.http
* java.base/sun.net.www
* java.base/sun.net
* @run main/othervm -Dtest.requiresHost=true * @run main/othervm -Dtest.requiresHost=true
* -Djdk.httpclient.HttpClient.log=headers * -Djdk.httpclient.HttpClient.log=headers
* -Djdk.internal.httpclient.debug=false * -Djdk.internal.httpclient.debug=false

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,15 +25,9 @@
* @test * @test
* @summary Checks HTTP versions when interacting with an HTTP/2 server * @summary Checks HTTP versions when interacting with an HTTP/2 server
* @bug 8242044 * @bug 8242044
* @modules java.base/sun.net.www.http * @library /test/lib /test/jdk/java/net/httpclient/lib
* java.net.http/jdk.internal.net.http.common * @build jdk.httpclient.test.lib.http2.Http2TestServer jdk.test.lib.net.SimpleSSLContext
* java.net.http/jdk.internal.net.http.frame * jdk.test.lib.Platform
* java.net.http/jdk.internal.net.http.hpack
* java.logging
* @library /test/lib http2/server
* @build Http2TestServer
* @build jdk.test.lib.net.SimpleSSLContext
* @build jdk.test.lib.Platform
* @run testng/othervm HttpVersionsTest * @run testng/othervm HttpVersionsTest
*/ */
@ -48,6 +42,10 @@ import java.net.http.HttpResponse;
import java.util.concurrent.ExecutorService; import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
import javax.net.ssl.SSLContext; import javax.net.ssl.SSLContext;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
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; import jdk.test.lib.net.SimpleSSLContext;
import org.testng.annotations.AfterTest; import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest; import org.testng.annotations.BeforeTest;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -36,6 +36,8 @@ import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream; import java.util.stream.Stream;
import javax.net.ssl.SSLContext; import javax.net.ssl.SSLContext;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import jdk.test.lib.net.SimpleSSLContext; import jdk.test.lib.net.SimpleSSLContext;
import static java.lang.System.out; import static java.lang.System.out;
@ -47,15 +49,9 @@ import static java.lang.System.out;
* even when using an HTTPS tunnel. This test uses an authenticating * even when using an HTTPS tunnel. This test uses an authenticating
* proxy (basic auth) serving an authenticated server (basic auth). * proxy (basic auth) serving an authenticated server (basic auth).
* The test also helps verifying the fix for 8262027. * The test also helps verifying the fix for 8262027.
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters ProxyServer HttpsTunnelAuthTest * @build jdk.httpclient.test.lib.common.HttpServerAdapters jdk.test.lib.net.SimpleSSLContext
* @modules java.net.http/jdk.internal.net.http.common * ProxyServer HttpsTunnelAuthTest
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* java.logging
* java.base/sun.net.www.http
* java.base/sun.net.www
* java.base/sun.net
* @run main/othervm -Djdk.httpclient.HttpClient.log=requests,headers,errors * @run main/othervm -Djdk.httpclient.HttpClient.log=requests,headers,errors
* -Djdk.http.auth.tunneling.disabledSchemes * -Djdk.http.auth.tunneling.disabledSchemes
* -Djdk.httpclient.allowRestrictedHeaders=connection * -Djdk.httpclient.allowRestrictedHeaders=connection

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -38,6 +38,8 @@ import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream; import java.util.stream.Stream;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import static java.lang.String.format; import static java.lang.String.format;
import static java.lang.System.out; import static java.lang.System.out;
@ -50,15 +52,9 @@ import static java.lang.System.out;
* a new h2 connection to the new host. It also verifies that * a new h2 connection to the new host. It also verifies that
* the stack sends the appropriate "host" header to the proxy. * the stack sends the appropriate "host" header to the proxy.
* @bug 8196967 8222527 * @bug 8196967 8222527
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters DigestEchoServer HttpsTunnelTest * @build jdk.httpclient.test.lib.common.HttpServerAdapters jdk.test.lib.net.SimpleSSLContext
* @modules java.net.http/jdk.internal.net.http.common * DigestEchoServer HttpsTunnelTest
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* java.logging
* java.base/sun.net.www.http
* java.base/sun.net.www
* java.base/sun.net
* @run main/othervm -Dtest.requiresHost=true * @run main/othervm -Dtest.requiresHost=true
* -Djdk.httpclient.HttpClient.log=headers * -Djdk.httpclient.HttpClient.log=headers
* -Djdk.internal.httpclient.debug=true HttpsTunnelTest * -Djdk.internal.httpclient.debug=true HttpsTunnelTest

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -24,13 +24,9 @@
/* /*
* @test * @test
* @bug 8252374 * @bug 8252374
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * @build jdk.httpclient.test.lib.common.HttpServerAdapters jdk.test.lib.net.SimpleSSLContext
* ReferenceTracker AggregateRequestBodyTest * ReferenceTracker
* @modules java.base/sun.net.www.http
* java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* @run testng/othervm -Djdk.internal.httpclient.debug=true * @run testng/othervm -Djdk.internal.httpclient.debug=true
* -Djdk.httpclient.HttpClient.log=requests,responses,errors * -Djdk.httpclient.HttpClient.log=requests,responses,errors
* ISO_8859_1_Test * ISO_8859_1_Test
@ -81,6 +77,9 @@ import java.util.stream.LongStream;
import java.util.stream.Stream; import java.util.stream.Stream;
import javax.net.ssl.SSLContext; import javax.net.ssl.SSLContext;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import com.sun.net.httpserver.HttpServer; import com.sun.net.httpserver.HttpServer;
import com.sun.net.httpserver.HttpsConfigurator; import com.sun.net.httpserver.HttpsConfigurator;
import com.sun.net.httpserver.HttpsServer; import com.sun.net.httpserver.HttpsServer;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,12 +25,8 @@
* @test * @test
* @summary Tests response body subscribers's onNext's Lists are unmodifiable, * @summary Tests response body subscribers's onNext's Lists are unmodifiable,
* and that the buffers are read-only * and that the buffers are read-only
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext * @build jdk.test.lib.net.SimpleSSLContext jdk.httpclient.test.lib.http2.Http2TestServer
* @modules java.base/sun.net.www.http
* java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* @run testng/othervm ImmutableFlowItems * @run testng/othervm ImmutableFlowItems
*/ */
@ -57,6 +53,9 @@ import java.net.http.HttpResponse.BodyHandler;
import java.net.http.HttpResponse.BodySubscriber; import java.net.http.HttpResponse.BodySubscriber;
import java.net.http.HttpResponse.BodySubscribers; import java.net.http.HttpResponse.BodySubscribers;
import javax.net.ssl.SSLContext; import javax.net.ssl.SSLContext;
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; import jdk.test.lib.net.SimpleSSLContext;
import org.testng.annotations.AfterTest; import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest; import org.testng.annotations.BeforeTest;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,12 +26,9 @@
* @summary Tests an asynchronous BodySubscriber that completes * @summary Tests an asynchronous BodySubscriber that completes
* immediately with an InputStream which issues bad * immediately with an InputStream which issues bad
* requests * requests
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext ReferenceTracker * @build jdk.test.lib.net.SimpleSSLContext ReferenceTracker
* @modules java.base/sun.net.www.http * jdk.httpclient.test.lib.common.HttpServerAdapters
* java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* @run testng/othervm InvalidInputStreamSubscriptionRequest * @run testng/othervm InvalidInputStreamSubscriptionRequest
*/ */
@ -73,6 +70,8 @@ import java.util.concurrent.Flow;
import java.util.concurrent.Flow.Publisher; import java.util.concurrent.Flow.Publisher;
import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicLong;
import java.util.function.Supplier; import java.util.function.Supplier;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import static java.lang.System.out; import static java.lang.System.out;
import static java.nio.charset.StandardCharsets.UTF_8; import static java.nio.charset.StandardCharsets.UTF_8;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -27,12 +27,9 @@
* @summary Tests an asynchronous BodySubscriber that completes * @summary Tests an asynchronous BodySubscriber that completes
* immediately with a Publisher<List<ByteBuffer>> whose * immediately with a Publisher<List<ByteBuffer>> whose
* subscriber issues bad requests * subscriber issues bad requests
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext ReferenceTracker * @build jdk.test.lib.net.SimpleSSLContext ReferenceTracker
* @modules java.base/sun.net.www.http * jdk.httpclient.test.lib.common.HttpServerAdapters
* java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* @run testng/othervm InvalidSubscriptionRequest * @run testng/othervm InvalidSubscriptionRequest
*/ */
@ -71,6 +68,9 @@ import java.util.concurrent.Flow;
import java.util.concurrent.Flow.Publisher; import java.util.concurrent.Flow.Publisher;
import java.util.function.Supplier; import java.util.function.Supplier;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import static java.lang.System.out; import static java.lang.System.out;
import static java.nio.charset.StandardCharsets.UTF_8; import static java.nio.charset.StandardCharsets.UTF_8;
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertEquals;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -60,6 +60,8 @@ import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicLong;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
/** /**
* @test * @test
@ -75,15 +77,9 @@ import java.util.concurrent.atomic.AtomicLong;
* as first argument, and copy paste the new values of the COMMAND and * as first argument, and copy paste the new values of the COMMAND and
* BASE64_CERT constant printed by the test into the test. * BASE64_CERT constant printed by the test into the test.
* Then restore the original at run line and test again. * Then restore the original at run line and test again.
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters DigestEchoServer LargeHandshakeTest * @build jdk.httpclient.test.lib.common.HttpServerAdapters jdk.test.lib.net.SimpleSSLContext
* @modules java.net.http/jdk.internal.net.http.common * DigestEchoServer
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* java.logging
* java.base/sun.net.www.http
* java.base/sun.net.www
* java.base/sun.net
* @run main/othervm -Dtest.requiresHost=true * @run main/othervm -Dtest.requiresHost=true
* -Djdk.httpclient.HttpClient.log=headers * -Djdk.httpclient.HttpClient.log=headers
* -Djdk.internal.httpclient.debug=true * -Djdk.internal.httpclient.debug=true

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2019, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -50,6 +50,8 @@ import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicLong;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
/** /**
* @test * @test
@ -57,15 +59,9 @@ import java.util.concurrent.atomic.AtomicLong;
* @summary This test verifies that the HttpClient works correctly when the server * @summary This test verifies that the HttpClient works correctly when the server
* sends large amount of data. Note that this test will pass even without * sends large amount of data. Note that this test will pass even without
* the fix for JDK-8231449, which is unfortunate. * the fix for JDK-8231449, which is unfortunate.
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters DigestEchoServer LargeResponseTest * @build jdk.httpclient.test.lib.common.HttpServerAdapters
* @modules java.net.http/jdk.internal.net.http.common * jdk.test.lib.net.SimpleSSLContext DigestEchoServer
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* java.logging
* java.base/sun.net.www.http
* java.base/sun.net.www
* java.base/sun.net
* @run main/othervm -Dtest.requiresHost=true * @run main/othervm -Dtest.requiresHost=true
* -Djdk.httpclient.HttpClient.log=headers * -Djdk.httpclient.HttpClient.log=headers
* -Djdk.internal.httpclient.debug=true * -Djdk.internal.httpclient.debug=true

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -54,6 +54,8 @@ import java.util.function.Supplier;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream; import java.util.stream.Stream;
import javax.net.ssl.SSLContext; import javax.net.ssl.SSLContext;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import com.sun.net.httpserver.HttpServer; import com.sun.net.httpserver.HttpServer;
import com.sun.net.httpserver.HttpsConfigurator; import com.sun.net.httpserver.HttpsConfigurator;
import com.sun.net.httpserver.HttpsServer; import com.sun.net.httpserver.HttpsServer;
@ -77,15 +79,9 @@ import static org.testng.Assert.assertTrue;
* the BodyHandlers returned by BodyHandler::fromLineSubscriber * the BodyHandlers returned by BodyHandler::fromLineSubscriber
* and BodyHandler::asLines * and BodyHandler::asLines
* @bug 8256459 * @bug 8256459
* @modules java.base/sun.net.www.http * @library /test/lib /test/jdk/java/net/httpclient/lib
* java.net.http/jdk.internal.net.http.common * @build ReferenceTracker jdk.httpclient.test.lib.http2.Http2TestServer
* java.net.http/jdk.internal.net.http.frame * jdk.test.lib.net.SimpleSSLContext
* java.net.http/jdk.internal.net.http.hpack
* java.logging
* jdk.httpserver
* @library /test/lib http2/server
* @build Http2TestServer LineBodyHandlerTest HttpServerAdapters ReferenceTracker
* @build jdk.test.lib.net.SimpleSSLContext
* @run testng/othervm -XX:+UnlockDiagnosticVMOptions -XX:DiagnoseSyncOnValueBasedClasses=1 LineBodyHandlerTest * @run testng/othervm -XX:+UnlockDiagnosticVMOptions -XX:DiagnoseSyncOnValueBasedClasses=1 LineBodyHandlerTest
*/ */

View File

@ -24,12 +24,8 @@
/* /*
* @test * @test
* @summary Tests mapped response subscriber * @summary Tests mapped response subscriber
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext * @build jdk.test.lib.net.SimpleSSLContext jdk.httpclient.test.lib.http2.Http2TestServer
* @modules java.base/sun.net.www.http
* java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* @run testng/othervm * @run testng/othervm
* -Djdk.internal.httpclient.debug=true * -Djdk.internal.httpclient.debug=true
* MappingResponseSubscriber * MappingResponseSubscriber
@ -64,6 +60,9 @@ import java.util.function.Function;
import javax.net.ssl.SSLContext; import javax.net.ssl.SSLContext;
import jdk.internal.net.http.common.OperationTrackers.Tracker; 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; import jdk.test.lib.net.SimpleSSLContext;
import org.testng.annotations.AfterTest; import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest; import org.testng.annotations.BeforeTest;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,16 +25,8 @@
* @test * @test
* @bug 8196389 * @bug 8196389
* @summary Should HttpClient support SETTINGS_MAX_CONCURRENT_STREAMS from the server * @summary Should HttpClient support SETTINGS_MAX_CONCURRENT_STREAMS from the server
* * @library /test/lib /test/jdk/java/net/httpclient/lib
* @modules java.base/sun.net.www.http * @build jdk.httpclient.test.lib.http2.Http2TestServer jdk.test.lib.net.SimpleSSLContext
* java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* java.logging
* jdk.httpserver
* @library /test/lib http2/server
* @build Http2TestServer
* @build jdk.test.lib.net.SimpleSSLContext
* @run testng/othervm -ea -esa MaxStreams * @run testng/othervm -ea -esa MaxStreams
*/ */
@ -60,6 +52,9 @@ import java.net.http.HttpRequest;
import java.net.http.HttpResponse; import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandler; import java.net.http.HttpResponse.BodyHandler;
import java.net.http.HttpResponse.BodyHandlers; import java.net.http.HttpResponse.BodyHandlers;
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; import jdk.test.lib.net.SimpleSSLContext;
import org.testng.annotations.AfterTest; import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest; import org.testng.annotations.BeforeTest;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,12 +25,8 @@
* @test * @test
* @bug 8161157 * @bug 8161157
* @summary Test response body handlers/subscribers when there is no body * @summary Test response body handlers/subscribers when there is no body
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext * @build jdk.test.lib.net.SimpleSSLContext jdk.httpclient.test.lib.http2.Http2TestServer
* @modules java.base/sun.net.www.http
* java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* @run testng/othervm * @run testng/othervm
* -Djdk.internal.httpclient.debug=true * -Djdk.internal.httpclient.debug=true
* -Djdk.httpclient.HttpClient.log=all * -Djdk.httpclient.HttpClient.log=all

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,12 +25,8 @@
* @test * @test
* @bug 8161157 * @bug 8161157
* @summary Test response body handlers/subscribers when there is no body * @summary Test response body handlers/subscribers when there is no body
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext * @build jdk.test.lib.net.SimpleSSLContext jdk.httpclient.test.lib.http2.Http2TestServer
* @modules java.base/sun.net.www.http
* java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* @run testng/othervm * @run testng/othervm
* -Djdk.internal.httpclient.debug=true * -Djdk.internal.httpclient.debug=true
* -Djdk.httpclient.HttpClient.log=all * -Djdk.httpclient.HttpClient.log=all

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,15 +26,8 @@
* @summary Verify that non-US-ASCII chars are replaced with a sequence of * @summary Verify that non-US-ASCII chars are replaced with a sequence of
* escaped octets that represent that char in the UTF-8 character set. * escaped octets that represent that char in the UTF-8 character set.
* @bug 8201238 * @bug 8201238
* @modules java.base/sun.net.www.http * @library /test/lib /test/jdk/java/net/httpclient/lib
* java.net.http/jdk.internal.net.http.common * @build jdk.httpclient.test.lib.http2.Http2TestServer jdk.test.lib.net.SimpleSSLContext
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* java.logging
* jdk.httpserver
* @library /test/lib http2/server
* @build Http2TestServer
* @build jdk.test.lib.net.SimpleSSLContext
* @compile -encoding utf-8 NonAsciiCharsInURI.java * @compile -encoding utf-8 NonAsciiCharsInURI.java
* @run testng/othervm * @run testng/othervm
* -Djdk.httpclient.HttpClient.log=reqeusts,headers * -Djdk.httpclient.HttpClient.log=reqeusts,headers
@ -58,6 +51,8 @@ import java.net.http.HttpResponse.BodyHandlers;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import jdk.test.lib.net.SimpleSSLContext; import jdk.test.lib.net.SimpleSSLContext;
import org.testng.annotations.AfterTest; import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest; import org.testng.annotations.BeforeTest;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,18 +26,17 @@
* @bug 8237470 * @bug 8237470
* @summary Confirm HttpResponse.BodySubscribers#ofFileDownload(Path) * @summary Confirm HttpResponse.BodySubscribers#ofFileDownload(Path)
* works only with the default file system * works only with the default file system
* @modules java.base/sun.net.www.http * @library /test/lib /test/jdk/java/net/httpclient/lib
* java.net.http/jdk.internal.net.http.common * @build jdk.httpclient.test.lib.common.HttpServerAdapters
* java.net.http/jdk.internal.net.http.frame * jdk.httpclient.test.lib.http2.Http2TestServer
* java.net.http/jdk.internal.net.http.hpack * jdk.httpclient.test.lib.http2.Http2TestServerConnection
* jdk.httpserver * jdk.httpclient.test.lib.http2.Http2TestExchange
* @library /test/lib ../http2/server * jdk.httpclient.test.lib.http2.Http2Handler
* @build Http2TestServer Http2TestServerConnection Http2TestExchange * jdk.httpclient.test.lib.http2.OutgoingPushPromise
* Http2Handler OutgoingPushPromise Queue * jdk.httpclient.test.lib.http2.Queue
* @build jdk.test.lib.net.SimpleSSLContext * jdk.test.lib.net.SimpleSSLContext
* @build jdk.test.lib.Platform * jdk.test.lib.Platform
* @build jdk.test.lib.util.FileUtils * jdk.test.lib.util.FileUtils
* @compile ../HttpServerAdapters.java
* @run testng/othervm BodyHandlerOfFileDownloadTest * @run testng/othervm BodyHandlerOfFileDownloadTest
* @run testng/othervm/java.security.policy=ofFileDownload.policy BodyHandlerOfFileDownloadTest * @run testng/othervm/java.security.policy=ofFileDownload.policy BodyHandlerOfFileDownloadTest
*/ */
@ -69,7 +68,13 @@ import java.nio.file.FileSystems;
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.Path; import java.nio.file.Path;
import java.util.Map; import java.util.Map;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import jdk.httpclient.test.lib.http2.Http2TestServerConnection;
import jdk.httpclient.test.lib.http2.Http2TestExchange;
import jdk.httpclient.test.lib.http2.Http2Handler;
import jdk.httpclient.test.lib.http2.OutgoingPushPromise;
import jdk.httpclient.test.lib.http2.Queue;
import static java.lang.System.out; import static java.lang.System.out;
import static java.net.http.HttpClient.Builder.NO_PROXY; import static java.net.http.HttpClient.Builder.NO_PROXY;
import static java.nio.file.StandardOpenOption.CREATE; import static java.nio.file.StandardOpenOption.CREATE;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -27,18 +27,16 @@
* @summary Confirm HttpResponse.BodyHandlers#ofFile(Path) * @summary Confirm HttpResponse.BodyHandlers#ofFile(Path)
* works with default and non-default file systems * works with default and non-default file systems
* when SecurityManager is enabled * when SecurityManager is enabled
* @modules java.base/sun.net.www.http * @library /test/lib /test/jdk/java/net/httpclient/lib
* java.net.http/jdk.internal.net.http.common * @build jdk.httpclient.test.lib.common.HttpServerAdapters
* java.net.http/jdk.internal.net.http.frame * jdk.httpclient.test.lib.http2.Http2TestServer
* java.net.http/jdk.internal.net.http.hpack * jdk.httpclient.test.lib.http2.Http2TestServerConnection
* jdk.httpserver * jdk.httpclient.test.lib.http2.Http2TestExchange
* @library /test/lib ../http2/server * jdk.httpclient.test.lib.http2.Http2Handler
* @build Http2TestServer Http2TestServerConnection Http2TestExchange * jdk.httpclient.test.lib.http2.OutgoingPushPromise
* Http2Handler OutgoingPushPromise Queue * jdk.httpclient.test.lib.http2.Queue
* @build jdk.test.lib.net.SimpleSSLContext * jdk.test.lib.net.SimpleSSLContext
* @build jdk.test.lib.Platform * jdk.test.lib.Platform jdk.test.lib.util.FileUtils
* @build jdk.test.lib.util.FileUtils
* @compile ../HttpServerAdapters.java
* @run testng/othervm BodyHandlerOfFileTest * @run testng/othervm BodyHandlerOfFileTest
* @run testng/othervm/java.security.policy=ofFile.policy BodyHandlerOfFileTest * @run testng/othervm/java.security.policy=ofFile.policy BodyHandlerOfFileTest
*/ */
@ -67,7 +65,13 @@ import java.net.http.HttpResponse;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.nio.file.*; import java.nio.file.*;
import java.util.Map; import java.util.Map;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import jdk.httpclient.test.lib.http2.Http2TestServerConnection;
import jdk.httpclient.test.lib.http2.Http2TestExchange;
import jdk.httpclient.test.lib.http2.Http2Handler;
import jdk.httpclient.test.lib.http2.OutgoingPushPromise;
import jdk.httpclient.test.lib.http2.Queue;
import static java.lang.System.out; import static java.lang.System.out;
import static java.net.http.HttpClient.Builder.NO_PROXY; import static java.net.http.HttpClient.Builder.NO_PROXY;
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertEquals;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -27,18 +27,15 @@
* @summary Confirm HttpResponse.BodySubscribers#ofFile(Path) * @summary Confirm HttpResponse.BodySubscribers#ofFile(Path)
* works with default and non-default file systems * works with default and non-default file systems
* when SecurityManager is enabled * when SecurityManager is enabled
* @modules java.base/sun.net.www.http * @library /test/lib /test/jdk/java/net/httpclient/lib
* java.net.http/jdk.internal.net.http.common * @build jdk.httpclient.test.lib.common.HttpServerAdapters
* java.net.http/jdk.internal.net.http.frame * jdk.httpclient.test.lib.http2.Http2TestServer
* java.net.http/jdk.internal.net.http.hpack * jdk.httpclient.test.lib.http2.Http2TestServerConnection
* jdk.httpserver * jdk.httpclient.test.lib.http2.Http2TestExchange
* @library /test/lib ../http2/server * jdk.httpclient.test.lib.http2.Http2Handler
* @build Http2TestServer Http2TestServerConnection Http2TestExchange * jdk.httpclient.test.lib.http2.OutgoingPushPromise
* Http2Handler OutgoingPushPromise Queue * jdk.httpclient.test.lib.http2.Queue jdk.test.lib.net.SimpleSSLContext
* @build jdk.test.lib.net.SimpleSSLContext * jdk.test.lib.Platform jdk.test.lib.util.FileUtils
* @build jdk.test.lib.Platform
* @build jdk.test.lib.util.FileUtils
* @compile ../HttpServerAdapters.java
* @run testng/othervm BodySubscriberOfFileTest * @run testng/othervm BodySubscriberOfFileTest
* @run testng/othervm/java.security.policy=ofFile.policy BodySubscriberOfFileTest * @run testng/othervm/java.security.policy=ofFile.policy BodySubscriberOfFileTest
*/ */
@ -75,7 +72,13 @@ import java.security.PrivilegedAction;
import java.util.Map; import java.util.Map;
import java.util.concurrent.Flow; import java.util.concurrent.Flow;
import java.util.stream.IntStream; import java.util.stream.IntStream;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import jdk.httpclient.test.lib.http2.Http2TestServerConnection;
import jdk.httpclient.test.lib.http2.Http2TestExchange;
import jdk.httpclient.test.lib.http2.Http2Handler;
import jdk.httpclient.test.lib.http2.OutgoingPushPromise;
import jdk.httpclient.test.lib.http2.Queue;
import static java.lang.System.out; import static java.lang.System.out;
import static java.net.http.HttpClient.Builder.NO_PROXY; import static java.net.http.HttpClient.Builder.NO_PROXY;
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertEquals;

View File

@ -1,5 +1,5 @@
// //
// Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. // Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
// //
// This code is free software; you can redistribute it and/or modify it // This code is free software; you can redistribute it and/or modify it
@ -38,8 +38,8 @@ grant codeBase "file:${test.classes}/../../../../../test/lib/-" {
permission java.io.FilePermission "${user.dir}${/}defaultDir", "delete"; permission java.io.FilePermission "${user.dir}${/}defaultDir", "delete";
}; };
// for java/net/httpclient/http2/server/* // for jdk/httpclient/test/lib/* classes
grant codeBase "file:${test.classes}/../../../../../java/net/httpclient/http2/server/*" { grant codeBase "file:${test.classes}/../../../../../test/jdk/java/net/httpclient/lib/-" {
permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.net.http.common"; permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.net.http.common";
permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.net.http.frame"; permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.net.http.frame";
permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.net.http.hpack"; permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.net.http.hpack";

View File

@ -1,5 +1,5 @@
// //
// Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. // Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
// //
// This code is free software; you can redistribute it and/or modify it // This code is free software; you can redistribute it and/or modify it
@ -38,8 +38,8 @@ grant codeBase "file:${test.classes}/../../../../../test/lib/-" {
permission java.io.FilePermission "${user.dir}${/}defaultDir/*", "read,delete"; permission java.io.FilePermission "${user.dir}${/}defaultDir/*", "read,delete";
}; };
// for java/net/httpclient/http2/server/* // for jdk/httpclient/test/lib/* classes
grant codeBase "file:${test.classes}/../../../../../java/net/httpclient/http2/server/*" { grant codeBase "file:${test.classes}/../../../../../test/jdk/java/net/httpclient/lib/-" {
permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.net.http.common"; permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.net.http.common";
permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.net.http.frame"; permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.net.http.frame";
permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.net.http.hpack"; permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.net.http.hpack";

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -28,16 +28,10 @@
* it verifies that the client honor the jdk.http.auth.*.disabledSchemes * it verifies that the client honor the jdk.http.auth.*.disabledSchemes
* net properties. * net properties.
* @bug 8087112 * @bug 8087112
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext DigestEchoServer DigestEchoClient * @build jdk.test.lib.net.SimpleSSLContext DigestEchoServer DigestEchoClient
* ReferenceTracker ProxyAuthDisabledSchemes * ReferenceTracker ProxyAuthDisabledSchemes
* @modules java.net.http/jdk.internal.net.http.common * jdk.httpclient.test.lib.common.HttpServerAdapters
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* java.logging
* java.base/sun.net.www.http
* java.base/sun.net.www
* java.base/sun.net
* @run main/othervm -Djdk.http.auth.proxying.disabledSchemes=Basic,Digest * @run main/othervm -Djdk.http.auth.proxying.disabledSchemes=Basic,Digest
* -Djdk.http.auth.tunneling.disabledSchemes=Digest,Basic * -Djdk.http.auth.tunneling.disabledSchemes=Digest,Basic
* ProxyAuthDisabledSchemes * ProxyAuthDisabledSchemes

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -28,16 +28,10 @@
* headers directly when connecting with a server over SSL, and * headers directly when connecting with a server over SSL, and
* it verifies that the client honor the jdk.http.auth.*.disabledSchemes * it verifies that the client honor the jdk.http.auth.*.disabledSchemes
* net properties. * net properties.
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext DigestEchoServer DigestEchoClient * @build jdk.test.lib.net.SimpleSSLContext DigestEchoServer DigestEchoClient
* ReferenceTracker ProxyAuthDisabledSchemesSSL * ReferenceTracker ProxyAuthDisabledSchemesSSL
* @modules java.net.http/jdk.internal.net.http.common * jdk.httpclient.test.lib.common.HttpServerAdapters
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* java.logging
* java.base/sun.net.www.http
* java.base/sun.net.www
* java.base/sun.net
* @run main/othervm/timeout=300 * @run main/othervm/timeout=300
* -Djdk.http.auth.proxying.disabledSchemes=Basic,Digest * -Djdk.http.auth.proxying.disabledSchemes=Basic,Digest
* -Djdk.http.auth.tunneling.disabledSchemes=Digest,Basic * -Djdk.http.auth.tunneling.disabledSchemes=Digest,Basic

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,18 +26,9 @@
* @bug 8244205 * @bug 8244205
* @summary checks that a different proxy returned for * @summary checks that a different proxy returned for
* the same host:port is taken into account * the same host:port is taken into account
* @modules java.base/sun.net.www.http * @library /test/lib /test/jdk/java/net/httpclient/lib
* java.net.http/jdk.internal.net.http.common * @build DigestEchoServer ProxySelectorTest jdk.httpclient.test.lib.http2.Http2TestServer
* java.net.http/jdk.internal.net.http.frame * jdk.test.lib.net.SimpleSSLContext
* java.net.http/jdk.internal.net.http.hpack
* java.logging
* jdk.httpserver
* java.base/sun.net.www.http
* java.base/sun.net.www
* java.base/sun.net
* @library /test/lib http2/server
* @build HttpServerAdapters DigestEchoServer Http2TestServer ProxySelectorTest
* @build jdk.test.lib.net.SimpleSSLContext
* @run testng/othervm * @run testng/othervm
* -Djdk.http.auth.tunneling.disabledSchemes * -Djdk.http.auth.tunneling.disabledSchemes
* -Djdk.httpclient.HttpClient.log=headers,requests * -Djdk.httpclient.HttpClient.log=headers,requests
@ -83,6 +74,8 @@ import java.util.concurrent.Executors;
import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import static java.lang.System.err; import static java.lang.System.err;
import static java.lang.System.out; import static java.lang.System.out;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -24,14 +24,8 @@
/* /*
* @test * @test
* @summary Method change during redirection * @summary Method change during redirection
* @modules java.base/sun.net.www.http * @library /test/lib /test/jdk/java/net/httpclient/lib
* java.net.http/jdk.internal.net.http.common * @build jdk.httpclient.test.lib.http2.Http2TestServer jdk.test.lib.net.SimpleSSLContext
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* jdk.httpserver
* @library /test/lib http2/server
* @build Http2TestServer
* @build jdk.test.lib.net.SimpleSSLContext
* @run testng/othervm RedirectMethodChange * @run testng/othervm RedirectMethodChange
*/ */
@ -50,6 +44,8 @@ import java.net.http.HttpResponse.BodyHandlers;
import com.sun.net.httpserver.HttpServer; import com.sun.net.httpserver.HttpServer;
import com.sun.net.httpserver.HttpsConfigurator; import com.sun.net.httpserver.HttpsConfigurator;
import com.sun.net.httpserver.HttpsServer; import com.sun.net.httpserver.HttpsServer;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import jdk.test.lib.net.SimpleSSLContext; import jdk.test.lib.net.SimpleSSLContext;
import org.testng.annotations.AfterTest; import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest; import org.testng.annotations.BeforeTest;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -24,15 +24,8 @@
/* /*
* @test * @test
* @summary Test for cookie handling when redirecting * @summary Test for cookie handling when redirecting
* @modules java.base/sun.net.www.http * @library /test/lib /test/jdk/java/net/httpclient/lib
* java.net.http/jdk.internal.net.http.common * @build jdk.httpclient.test.lib.http2.Http2TestServer jdk.test.lib.net.SimpleSSLContext
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* java.logging
* jdk.httpserver
* @library /test/lib http2/server
* @build Http2TestServer
* @build jdk.test.lib.net.SimpleSSLContext
* @run testng/othervm * @run testng/othervm
* -Djdk.httpclient.HttpClient.log=trace,headers,requests * -Djdk.httpclient.HttpClient.log=trace,headers,requests
* RedirectWithCookie * RedirectWithCookie
@ -55,6 +48,8 @@ import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandlers; import java.net.http.HttpResponse.BodyHandlers;
import java.util.List; import java.util.List;
import javax.net.ssl.SSLContext; import javax.net.ssl.SSLContext;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import jdk.test.lib.net.SimpleSSLContext; import jdk.test.lib.net.SimpleSSLContext;
import org.testng.annotations.AfterTest; import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest; import org.testng.annotations.BeforeTest;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -37,7 +37,8 @@ import java.nio.charset.StandardCharsets;
import java.time.Duration; import java.time.Duration;
import javax.net.ssl.SSLContext; import javax.net.ssl.SSLContext;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import jdk.test.lib.net.SimpleSSLContext; import jdk.test.lib.net.SimpleSSLContext;
import jdk.test.lib.net.URIBuilder; import jdk.test.lib.net.URIBuilder;
import org.testng.Assert; import org.testng.Assert;
@ -49,14 +50,9 @@ import org.testng.annotations.Test;
* @test * @test
* @bug 8292044 * @bug 8292044
* @summary Tests behaviour of HttpClient when server responds with 102 or 103 status codes * @summary Tests behaviour of HttpClient when server responds with 102 or 103 status codes
* @modules java.base/sun.net.www.http * @library /test/lib /test/jdk/java/net/httpclient/lib
* java.net.http/jdk.internal.net.http.common * @build jdk.test.lib.net.SimpleSSLContext jdk.httpclient.test.lib.common.HttpServerAdapters
* java.net.http/jdk.internal.net.http.frame * jdk.httpclient.test.lib.http2.Http2TestServer
* java.net.http/jdk.internal.net.http.hpack
* java.logging
* jdk.httpserver
* @library /test/lib http2/server
* @build Http2TestServer HttpServerAdapters jdk.test.lib.net.SimpleSSLContext
* @run testng/othervm -Djdk.internal.httpclient.debug=true * @run testng/othervm -Djdk.internal.httpclient.debug=true
* * -Djdk.httpclient.HttpClient.log=headers,requests,responses,errors Response1xxTest * * -Djdk.httpclient.HttpClient.log=headers,requests,responses,errors Response1xxTest
*/ */

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -24,13 +24,9 @@
/* /*
* @test * @test
* @bug 8238270 * @bug 8238270
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * @build jdk.test.lib.net.SimpleSSLContext
* ReferenceTracker Response204V2Test * ReferenceTracker jdk.httpclient.test.lib.common.HttpServerAdapters
* @modules java.base/sun.net.www.http
* java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* @run testng/othervm -Djdk.internal.httpclient.debug=true * @run testng/othervm -Djdk.internal.httpclient.debug=true
* -Djdk.httpclient.HttpClient.log=requests,responses,errors * -Djdk.httpclient.HttpClient.log=requests,responses,errors
* Response204V2Test * Response204V2Test
@ -57,6 +53,8 @@ import java.util.concurrent.Executors;
import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import jdk.test.lib.net.SimpleSSLContext; import jdk.test.lib.net.SimpleSSLContext;
import org.testng.ITestContext; import org.testng.ITestContext;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,12 +26,8 @@
* @bug 8201186 * @bug 8201186
* @summary Tests an asynchronous BodySubscriber that completes * @summary Tests an asynchronous BodySubscriber that completes
* immediately with a Publisher<List<ByteBuffer>> * immediately with a Publisher<List<ByteBuffer>>
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext * @build jdk.test.lib.net.SimpleSSLContext jdk.httpclient.test.lib.common.HttpServerAdapters
* @modules java.base/sun.net.www.http
* java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* @run testng/othervm ResponsePublisher * @run testng/othervm ResponsePublisher
*/ */
@ -73,6 +69,8 @@ import java.util.concurrent.Flow;
import java.util.concurrent.Flow.Publisher; import java.util.concurrent.Flow.Publisher;
import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Supplier; import java.util.function.Supplier;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import static java.lang.System.out; import static java.lang.System.out;
import static java.nio.charset.StandardCharsets.UTF_8; import static java.nio.charset.StandardCharsets.UTF_8;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,15 +25,10 @@
* @test * @test
* @bug 8199943 * @bug 8199943
* @summary Test for cookie handling when retrying after close * @summary Test for cookie handling when retrying after close
* @modules java.base/sun.net.www.http * @library /test/lib /test/jdk/java/net/httpclient/lib
* java.net.http/jdk.internal.net.http.common * @build jdk.httpclient.test.lib.common.HttpServerAdapters
* java.net.http/jdk.internal.net.http.frame * jdk.httpclient.test.lib.http2.Http2TestServer jdk.test.lib.net.SimpleSSLContext
* java.net.http/jdk.internal.net.http.hpack * ReferenceTracker
* java.logging
* jdk.httpserver
* @library /test/lib http2/server
* @build Http2TestServer
* @build jdk.test.lib.net.SimpleSSLContext ReferenceTracker
* @run testng/othervm * @run testng/othervm
* -Djdk.httpclient.HttpClient.log=trace,headers,requests * -Djdk.httpclient.HttpClient.log=trace,headers,requests
* RetryWithCookie * RetryWithCookie
@ -67,6 +62,8 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicLong;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import static java.lang.System.out; import static java.lang.System.out;
import static java.net.http.HttpClient.Builder.NO_PROXY; import static java.net.http.HttpClient.Builder.NO_PROXY;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,12 +25,9 @@
* @test * @test
* @summary Tests that our client deals correctly with servers that * @summary Tests that our client deals correctly with servers that
* close the connection right after sending the last byte. * close the connection right after sending the last byte.
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters EncodedCharsInURI * @build jdk.test.lib.net.SimpleSSLContext
* @modules java.base/sun.net.www.http * jdk.httpclient.test.lib.common.HttpServerAdapters
* java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* @run testng/othervm -Djdk.tls.acknowledgeCloseNotify=true ServerCloseTest * @run testng/othervm -Djdk.tls.acknowledgeCloseNotify=true ServerCloseTest
*/ */
//* -Djdk.internal.httpclient.debug=true //* -Djdk.internal.httpclient.debug=true
@ -72,6 +69,8 @@ import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.Executor; import java.util.concurrent.Executor;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicLong;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import static java.lang.System.out; import static java.lang.System.out;
import static java.nio.charset.StandardCharsets.UTF_8; import static java.nio.charset.StandardCharsets.UTF_8;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,15 +26,10 @@
* @summary Verify that some special headers - such as User-Agent * @summary Verify that some special headers - such as User-Agent
* can be specified by the caller. * can be specified by the caller.
* @bug 8203771 8218546 8297200 * @bug 8203771 8218546 8297200
* @modules java.base/sun.net.www.http * @library /test/lib /test/jdk/java/net/httpclient/lib
* java.net.http/jdk.internal.net.http.common * @build jdk.httpclient.test.lib.common.HttpServerAdapters
* java.net.http/jdk.internal.net.http.frame * jdk.httpclient.test.lib.http2.Http2TestServer
* java.net.http/jdk.internal.net.http.hpack * jdk.test.lib.net.SimpleSSLContext
* java.logging
* jdk.httpserver
* @library /test/lib http2/server
* @build Http2TestServer HttpServerAdapters SpecialHeadersTest
* @build jdk.test.lib.net.SimpleSSLContext
* @run testng/othervm * @run testng/othervm
* -Djdk.httpclient.HttpClient.log=requests,headers,errors * -Djdk.httpclient.HttpClient.log=requests,headers,errors
* SpecialHeadersTest * SpecialHeadersTest
@ -88,6 +83,8 @@ import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Function; import java.util.function.Function;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import static java.lang.System.err; import static java.lang.System.err;
import static java.lang.System.out; import static java.lang.System.out;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, NTT DATA. * Copyright (c) 2021, NTT DATA.
* *
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@ -26,14 +26,9 @@
/* /*
* @test * @test
* @bug 8257736 * @bug 8257736
* @modules java.net.http * @library /test/jdk/java/net/httpclient/lib
* java.base/sun.net.www.http * @build jdk.httpclient.test.lib.common.HttpServerAdapters
* java.net.http/jdk.internal.net.http.common * jdk.httpclient.test.lib.http2.Http2TestServer
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* @library http2/server
* @build Http2TestServer Http2TestExchange
* @compile HttpServerAdapters.java
* @run testng/othervm StreamCloseTest * @run testng/othervm StreamCloseTest
*/ */
@ -50,6 +45,8 @@ import java.net.http.HttpResponse.BodyHandlers;
import java.net.InetAddress; import java.net.InetAddress;
import java.net.InetSocketAddress; import java.net.InetSocketAddress;
import java.net.URI; import java.net.URI;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import org.testng.annotations.AfterTest; import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest; import org.testng.annotations.BeforeTest;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,15 +25,8 @@
* @test * @test
* @summary Exercise a streaming subscriber ( InputStream ) without holding a * @summary Exercise a streaming subscriber ( InputStream ) without holding a
* strong (or any ) reference to the client. * strong (or any ) reference to the client.
* @modules java.base/sun.net.www.http * @library /test/lib /test/jdk/java/net/httpclient/lib
* java.net.http/jdk.internal.net.http.common * @build jdk.httpclient.test.lib.common.HttpServerAdapters jdk.test.lib.net.SimpleSSLContext
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* java.logging
* jdk.httpserver
* @library /test/lib http2/server
* @build Http2TestServer
* @build jdk.test.lib.net.SimpleSSLContext
* @run testng/othervm * @run testng/othervm
* -Djdk.httpclient.HttpClient.log=trace,headers,requests * -Djdk.httpclient.HttpClient.log=trace,headers,requests
* StreamingBody * StreamingBody
@ -53,6 +46,8 @@ import java.net.http.HttpRequest;
import java.net.http.HttpResponse; import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandlers; import java.net.http.HttpResponse.BodyHandlers;
import javax.net.ssl.SSLContext; import javax.net.ssl.SSLContext;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import jdk.test.lib.net.SimpleSSLContext; import jdk.test.lib.net.SimpleSSLContext;
import org.testng.annotations.AfterTest; import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest; import org.testng.annotations.BeforeTest;

View File

@ -1,2 +1,9 @@
modules = java.net.http modules=java.base/sun.net.www.http \
java.base/sun.net.www \
java.base/sun.net \
java.net.http/jdk.internal.net.http.common \
java.net.http/jdk.internal.net.http.frame \
java.net.http/jdk.internal.net.http.hpack \
java.logging \
jdk.httpserver
maxOutputSize = 2500000 maxOutputSize = 2500000

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,13 +25,10 @@
* @test * @test
* @summary Tests what happens when request publishers * @summary Tests what happens when request publishers
* throw unexpected exceptions. * throw unexpected exceptions.
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * @build jdk.test.lib.net.SimpleSSLContext
* ReferenceTracker AbstractThrowingPublishers ThrowingPublishersCustomAfterCancel * ReferenceTracker AbstractThrowingPublishers ThrowingPublishersCustomAfterCancel
* @modules java.base/sun.net.www.http * jdk.httpclient.test.lib.common.HttpServerAdapters
* java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* @run testng/othervm -Djdk.internal.httpclient.debug=true * @run testng/othervm -Djdk.internal.httpclient.debug=true
* -Djdk.httpclient.enableAllMethodRetry=true * -Djdk.httpclient.enableAllMethodRetry=true
* ThrowingPublishersCustomAfterCancel * ThrowingPublishersCustomAfterCancel

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,13 +25,10 @@
* @test * @test
* @summary Tests what happens when request publishers * @summary Tests what happens when request publishers
* throw unexpected exceptions. * throw unexpected exceptions.
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * @build jdk.test.lib.net.SimpleSSLContext
* ReferenceTracker AbstractThrowingPublishers ThrowingPublishersCustomBeforeCancel * ReferenceTracker AbstractThrowingPublishers ThrowingPublishersCustomBeforeCancel
* @modules java.base/sun.net.www.http * jdk.httpclient.test.lib.common.HttpServerAdapters
* java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* @run testng/othervm -Djdk.internal.httpclient.debug=true * @run testng/othervm -Djdk.internal.httpclient.debug=true
* -Djdk.httpclient.enableAllMethodRetry=true * -Djdk.httpclient.enableAllMethodRetry=true
* ThrowingPublishersCustomBeforeCancel * ThrowingPublishersCustomBeforeCancel

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,13 +25,10 @@
* @test * @test
* @summary Tests what happens when request publishers * @summary Tests what happens when request publishers
* throw unexpected exceptions. * throw unexpected exceptions.
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * @build jdk.test.lib.net.SimpleSSLContext
* ReferenceTracker AbstractThrowingPublishers ThrowingPublishersIOAfterCancel * ReferenceTracker AbstractThrowingPublishers ThrowingPublishersIOAfterCancel
* @modules java.base/sun.net.www.http * jdk.httpclient.test.lib.common.HttpServerAdapters
* java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* @run testng/othervm -Djdk.internal.httpclient.debug=true * @run testng/othervm -Djdk.internal.httpclient.debug=true
* -Djdk.httpclient.enableAllMethodRetry=true * -Djdk.httpclient.enableAllMethodRetry=true
* ThrowingPublishersIOAfterCancel * ThrowingPublishersIOAfterCancel

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,13 +25,10 @@
* @test * @test
* @summary Tests what happens when request publishers * @summary Tests what happens when request publishers
* throw unexpected exceptions. * throw unexpected exceptions.
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * @build jdk.test.lib.net.SimpleSSLContext
* ReferenceTracker AbstractThrowingPublishers ThrowingPublishersIOBeforeCancel * ReferenceTracker AbstractThrowingPublishers ThrowingPublishersIOBeforeCancel
* @modules java.base/sun.net.www.http * jdk.httpclient.test.lib.common.HttpServerAdapters
* java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* @run testng/othervm -Djdk.internal.httpclient.debug=true * @run testng/othervm -Djdk.internal.httpclient.debug=true
* -Djdk.httpclient.enableAllMethodRetry=true * -Djdk.httpclient.enableAllMethodRetry=true
* ThrowingPublishersIOBeforeCancel * ThrowingPublishersIOBeforeCancel

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,13 +25,10 @@
* @test * @test
* @summary Tests what happens when request publishers * @summary Tests what happens when request publishers
* throw unexpected exceptions. * throw unexpected exceptions.
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * @build jdk.test.lib.net.SimpleSSLContext
* ReferenceTracker AbstractThrowingPublishers ThrowingPublishersInNextRequest * ReferenceTracker AbstractThrowingPublishers ThrowingPublishersInNextRequest
* @modules java.base/sun.net.www.http * jdk.httpclient.test.lib.common.HttpServerAdapters
* java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* @run testng/othervm -Djdk.internal.httpclient.debug=true * @run testng/othervm -Djdk.internal.httpclient.debug=true
* -Djdk.httpclient.enableAllMethodRetry=true * -Djdk.httpclient.enableAllMethodRetry=true
* ThrowingPublishersInNextRequest * ThrowingPublishersInNextRequest

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,13 +25,10 @@
* @test * @test
* @summary Tests what happens when request publishers * @summary Tests what happens when request publishers
* throw unexpected exceptions. * throw unexpected exceptions.
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * @build jdk.test.lib.net.SimpleSSLContext
* ReferenceTracker AbstractThrowingPublishers ThrowingPublishersInRequest * ReferenceTracker AbstractThrowingPublishers ThrowingPublishersInRequest
* @modules java.base/sun.net.www.http * jdk.httpclient.test.lib.common.HttpServerAdapters
* java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* @run testng/othervm -Djdk.internal.httpclient.debug=true * @run testng/othervm -Djdk.internal.httpclient.debug=true
* -Djdk.httpclient.enableAllMethodRetry=true * -Djdk.httpclient.enableAllMethodRetry=true
* ThrowingPublishersInRequest * ThrowingPublishersInRequest

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,13 +25,10 @@
* @test * @test
* @summary Tests what happens when request publishers * @summary Tests what happens when request publishers
* throw unexpected exceptions. * throw unexpected exceptions.
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * @build jdk.test.lib.net.SimpleSSLContext
* ReferenceTracker AbstractThrowingPublishers ThrowingPublishersInSubscribe * ReferenceTracker AbstractThrowingPublishers ThrowingPublishersInSubscribe
* @modules java.base/sun.net.www.http * jdk.httpclient.test.lib.common.HttpServerAdapters
* java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* @run testng/othervm -Djdk.internal.httpclient.debug=true * @run testng/othervm -Djdk.internal.httpclient.debug=true
* -Djdk.httpclient.enableAllMethodRetry=true * -Djdk.httpclient.enableAllMethodRetry=true
* ThrowingPublishersInSubscribe * ThrowingPublishersInSubscribe

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,13 +25,10 @@
* @test * @test
* @summary Tests what happens when request publishers * @summary Tests what happens when request publishers
* throw unexpected exceptions. * throw unexpected exceptions.
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * @build jdk.test.lib.net.SimpleSSLContext
* ReferenceTracker AbstractThrowingPublishers ThrowingPublishersSanity * ReferenceTracker AbstractThrowingPublishers ThrowingPublishersSanity
* @modules java.base/sun.net.www.http * jdk.httpclient.test.lib.common.HttpServerAdapters
* java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* @run testng/othervm -Djdk.internal.httpclient.debug=true * @run testng/othervm -Djdk.internal.httpclient.debug=true
* -Djdk.httpclient.enableAllMethodRetry=true * -Djdk.httpclient.enableAllMethodRetry=true
* ThrowingPublishersSanity * ThrowingPublishersSanity

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,13 +26,10 @@
* @bug 8229822 * @bug 8229822
* @summary Tests what happens when push promise handlers and their * @summary Tests what happens when push promise handlers and their
* response body handlers and subscribers throw unexpected exceptions. * response body handlers and subscribers throw unexpected exceptions.
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * @build jdk.test.lib.net.SimpleSSLContext
* ReferenceTracker AbstractThrowingPushPromises ThrowingPushPromisesAsInputStreamCustom * ReferenceTracker AbstractThrowingPushPromises ThrowingPushPromisesAsInputStreamCustom
* @modules java.base/sun.net.www.http * jdk.httpclient.test.lib.common.HttpServerAdapters
* java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* @run testng/othervm -Djdk.internal.httpclient.debug=true ThrowingPushPromisesAsInputStreamCustom * @run testng/othervm -Djdk.internal.httpclient.debug=true ThrowingPushPromisesAsInputStreamCustom
*/ */

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,13 +26,10 @@
* @bug 8229822 * @bug 8229822
* @summary Tests what happens when push promise handlers and their * @summary Tests what happens when push promise handlers and their
* response body handlers and subscribers throw unexpected exceptions. * response body handlers and subscribers throw unexpected exceptions.
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * @build jdk.test.lib.net.SimpleSSLContext
* ReferenceTracker AbstractThrowingPushPromises ThrowingPushPromisesAsInputStreamIO * ReferenceTracker AbstractThrowingPushPromises ThrowingPushPromisesAsInputStreamIO
* @modules java.base/sun.net.www.http * jdk.httpclient.test.lib.common.HttpServerAdapters
* java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* @run testng/othervm -Djdk.internal.httpclient.debug=true ThrowingPushPromisesAsInputStreamIO * @run testng/othervm -Djdk.internal.httpclient.debug=true ThrowingPushPromisesAsInputStreamIO
*/ */

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,13 +26,10 @@
* @bug 8229822 * @bug 8229822
* @summary Tests what happens when push promise handlers and their * @summary Tests what happens when push promise handlers and their
* response body handlers and subscribers throw unexpected exceptions. * response body handlers and subscribers throw unexpected exceptions.
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * @build jdk.test.lib.net.SimpleSSLContext
* ReferenceTracker AbstractThrowingPushPromises ThrowingPushPromisesAsLinesCustom * ReferenceTracker AbstractThrowingPushPromises ThrowingPushPromisesAsLinesCustom
* @modules java.base/sun.net.www.http * jdk.httpclient.test.lib.common.HttpServerAdapters
* java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* @run testng/othervm -Djdk.internal.httpclient.debug=true ThrowingPushPromisesAsLinesCustom * @run testng/othervm -Djdk.internal.httpclient.debug=true ThrowingPushPromisesAsLinesCustom
*/ */

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,13 +26,10 @@
* @bug 8229822 * @bug 8229822
* @summary Tests what happens when push promise handlers and their * @summary Tests what happens when push promise handlers and their
* response body handlers and subscribers throw unexpected exceptions. * response body handlers and subscribers throw unexpected exceptions.
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * @build jdk.test.lib.net.SimpleSSLContext
* ReferenceTracker AbstractThrowingPushPromises ThrowingPushPromisesAsLinesIO * ReferenceTracker AbstractThrowingPushPromises ThrowingPushPromisesAsLinesIO
* @modules java.base/sun.net.www.http * jdk.httpclient.test.lib.common.HttpServerAdapters
* java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* @run testng/othervm -Djdk.internal.httpclient.debug=true ThrowingPushPromisesAsLinesIO * @run testng/othervm -Djdk.internal.httpclient.debug=true ThrowingPushPromisesAsLinesIO
*/ */

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,13 +26,10 @@
* @bug 8229822 * @bug 8229822
* @summary Tests what happens when push promise handlers and their * @summary Tests what happens when push promise handlers and their
* response body handlers and subscribers throw unexpected exceptions. * response body handlers and subscribers throw unexpected exceptions.
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * @build jdk.test.lib.net.SimpleSSLContext
* ReferenceTracker AbstractThrowingPushPromises ThrowingPushPromisesAsStringCustom * ReferenceTracker AbstractThrowingPushPromises ThrowingPushPromisesAsStringCustom
* @modules java.base/sun.net.www.http * jdk.httpclient.test.lib.common.HttpServerAdapters
* java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* @run testng/othervm -Djdk.internal.httpclient.debug=true ThrowingPushPromisesAsStringCustom * @run testng/othervm -Djdk.internal.httpclient.debug=true ThrowingPushPromisesAsStringCustom
*/ */

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,13 +26,10 @@
* @bug 8229822 * @bug 8229822
* @summary Tests what happens when push promise handlers and their * @summary Tests what happens when push promise handlers and their
* response body handlers and subscribers throw unexpected exceptions. * response body handlers and subscribers throw unexpected exceptions.
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * @build jdk.test.lib.net.SimpleSSLContext
* ReferenceTracker AbstractThrowingPushPromises ThrowingPushPromisesAsStringIO * ReferenceTracker AbstractThrowingPushPromises ThrowingPushPromisesAsStringIO
* @modules java.base/sun.net.www.http * jdk.httpclient.test.lib.common.HttpServerAdapters
* java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* @run testng/othervm -Djdk.internal.httpclient.debug=true ThrowingPushPromisesAsStringIO * @run testng/othervm -Djdk.internal.httpclient.debug=true ThrowingPushPromisesAsStringIO
*/ */

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,13 +26,10 @@
* @bug 8229822 * @bug 8229822
* @summary Tests what happens when push promise handlers and their * @summary Tests what happens when push promise handlers and their
* response body handlers and subscribers throw unexpected exceptions. * response body handlers and subscribers throw unexpected exceptions.
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * @build jdk.test.lib.net.SimpleSSLContext
* ReferenceTracker AbstractThrowingPushPromises ThrowingPushPromisesSanity * ReferenceTracker AbstractThrowingPushPromises ThrowingPushPromisesSanity
* @modules java.base/sun.net.www.http * jdk.httpclient.test.lib.common.HttpServerAdapters
* java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* @run testng/othervm -Djdk.internal.httpclient.debug=true ThrowingPushPromisesSanity * @run testng/othervm -Djdk.internal.httpclient.debug=true ThrowingPushPromisesSanity
*/ */

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,13 +25,10 @@
* @test * @test
* @summary Tests what happens when response body handlers and subscribers * @summary Tests what happens when response body handlers and subscribers
* throw unexpected exceptions. * throw unexpected exceptions.
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * @build jdk.test.lib.net.SimpleSSLContext
* ReferenceTracker ThrowingSubscribersAsInputStream AbstractThrowingSubscribers * ReferenceTracker ThrowingSubscribersAsInputStream AbstractThrowingSubscribers
* @modules java.base/sun.net.www.http * jdk.httpclient.test.lib.common.HttpServerAdapters
* java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* @run testng/othervm -Djdk.internal.httpclient.debug=true ThrowingSubscribersAsInputStream * @run testng/othervm -Djdk.internal.httpclient.debug=true ThrowingSubscribersAsInputStream
*/ */

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,13 +25,10 @@
* @test * @test
* @summary Tests what happens when response body handlers and subscribers * @summary Tests what happens when response body handlers and subscribers
* throw unexpected exceptions. * throw unexpected exceptions.
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * @build jdk.test.lib.net.SimpleSSLContext
* ReferenceTracker ThrowingSubscribersAsInputStreamAsync AbstractThrowingSubscribers * ReferenceTracker ThrowingSubscribersAsInputStreamAsync AbstractThrowingSubscribers
* @modules java.base/sun.net.www.http * jdk.httpclient.test.lib.common.HttpServerAdapters
* java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* @run testng/othervm -Djdk.internal.httpclient.debug=true ThrowingSubscribersAsInputStreamAsync * @run testng/othervm -Djdk.internal.httpclient.debug=true ThrowingSubscribersAsInputStreamAsync
*/ */

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,13 +25,10 @@
* @test * @test
* @summary Tests what happens when response body handlers and subscribers * @summary Tests what happens when response body handlers and subscribers
* throw unexpected exceptions. * throw unexpected exceptions.
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * @build jdk.test.lib.net.SimpleSSLContext
* ReferenceTracker ThrowingSubscribersAsLines AbstractThrowingSubscribers * ReferenceTracker ThrowingSubscribersAsLines AbstractThrowingSubscribers
* @modules java.base/sun.net.www.http * jdk.httpclient.test.lib.common.HttpServerAdapters
* java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* @run testng/othervm -Djdk.internal.httpclient.debug=true ThrowingSubscribersAsLines * @run testng/othervm -Djdk.internal.httpclient.debug=true ThrowingSubscribersAsLines
*/ */

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,13 +25,10 @@
* @test * @test
* @summary Tests what happens when response body handlers and subscribers * @summary Tests what happens when response body handlers and subscribers
* throw unexpected exceptions. * throw unexpected exceptions.
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * @build jdk.test.lib.net.SimpleSSLContext
* ReferenceTracker ThrowingSubscribersAsLinesAsync AbstractThrowingSubscribers * ReferenceTracker ThrowingSubscribersAsLinesAsync AbstractThrowingSubscribers
* @modules java.base/sun.net.www.http * jdk.httpclient.test.lib.common.HttpServerAdapters
* java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* @run testng/othervm -Djdk.internal.httpclient.debug=true ThrowingSubscribersAsLinesAsync * @run testng/othervm -Djdk.internal.httpclient.debug=true ThrowingSubscribersAsLinesAsync
*/ */

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,13 +25,10 @@
* @test * @test
* @summary Tests what happens when response body handlers and subscribers * @summary Tests what happens when response body handlers and subscribers
* throw unexpected exceptions. * throw unexpected exceptions.
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * @build jdk.test.lib.net.SimpleSSLContext
* ReferenceTracker ThrowingSubscribersAsString AbstractThrowingSubscribers * ReferenceTracker ThrowingSubscribersAsString AbstractThrowingSubscribers
* @modules java.base/sun.net.www.http * jdk.httpclient.test.lib.common.HttpServerAdapters
* java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* @run testng/othervm -Djdk.internal.httpclient.debug=true ThrowingSubscribersAsString * @run testng/othervm -Djdk.internal.httpclient.debug=true ThrowingSubscribersAsString
*/ */

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,13 +25,10 @@
* @test * @test
* @summary Tests what happens when response body handlers and subscribers * @summary Tests what happens when response body handlers and subscribers
* throw unexpected exceptions. * throw unexpected exceptions.
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * @build jdk.test.lib.net.SimpleSSLContext
* ReferenceTracker ThrowingSubscribersAsStringAsync AbstractThrowingSubscribers * ReferenceTracker ThrowingSubscribersAsStringAsync AbstractThrowingSubscribers
* @modules java.base/sun.net.www.http * jdk.httpclient.test.lib.common.HttpServerAdapters
* java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* @run testng/othervm -Djdk.internal.httpclient.debug=true ThrowingSubscribersAsStringAsync * @run testng/othervm -Djdk.internal.httpclient.debug=true ThrowingSubscribersAsStringAsync
*/ */

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -25,13 +25,10 @@
* @test * @test
* @summary Tests what happens when response body handlers and subscribers * @summary Tests what happens when response body handlers and subscribers
* throw unexpected exceptions. * throw unexpected exceptions.
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * @build jdk.test.lib.net.SimpleSSLContext
* ReferenceTracker ThrowingSubscribersSanity AbstractThrowingSubscribers * ReferenceTracker ThrowingSubscribersSanity AbstractThrowingSubscribers
* @modules java.base/sun.net.www.http * jdk.httpclient.test.lib.common.HttpServerAdapters
* java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* @run testng/othervm -Djdk.internal.httpclient.debug=true ThrowingSubscribersSanity * @run testng/othervm -Djdk.internal.httpclient.debug=true ThrowingSubscribersSanity
*/ */

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2020, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -31,6 +31,8 @@ import java.net.http.HttpResponse;
import java.util.concurrent.ExecutorService; import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
import javax.net.ssl.SSLContext; import javax.net.ssl.SSLContext;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import jdk.test.lib.net.SimpleSSLContext; import jdk.test.lib.net.SimpleSSLContext;
import org.testng.annotations.AfterTest; import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest; import org.testng.annotations.BeforeTest;
@ -48,15 +50,9 @@ import jdk.test.lib.security.SecurityUtils;
* @test * @test
* @bug 8239594 * @bug 8239594
* @summary This test verifies that the TLS version handshake respects ssl context * @summary This test verifies that the TLS version handshake respects ssl context
* @library /test/lib http2/server * @library /test/lib /test/jdk/java/net/httpclient/lib
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters TlsContextTest * @build jdk.test.lib.net.SimpleSSLContext TlsContextTest
* @modules java.net.http/jdk.internal.net.http.common * jdk.httpclient.test.lib.common.HttpServerAdapters
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* java.logging
* java.base/sun.net.www.http
* java.base/sun.net.www
* java.base/sun.net
* @run testng/othervm -Dtest.requiresHost=true * @run testng/othervm -Dtest.requiresHost=true
* -Djdk.httpclient.HttpClient.log=headers * -Djdk.httpclient.HttpClient.log=headers
* -Djdk.internal.httpclient.disableHostnameVerification * -Djdk.internal.httpclient.disableHostnameVerification

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -29,15 +29,8 @@
* header only in the case where an authenticator is configured * header only in the case where an authenticator is configured
* for the client. If no authenticator is configured the client * for the client. If no authenticator is configured the client
* should simply let the caller deal with the unauthorized response. * should simply let the caller deal with the unauthorized response.
* @modules java.base/sun.net.www.http * @library /test/lib /test/jdk/java/net/httpclient/lib
* java.net.http/jdk.internal.net.http.common * @build jdk.httpclient.test.lib.common.HttpServerAdapters jdk.test.lib.net.SimpleSSLContext
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* java.logging
* jdk.httpserver
* @library /test/lib http2/server
* @build Http2TestServer
* @build jdk.test.lib.net.SimpleSSLContext
* @run testng/othervm * @run testng/othervm
* -Djdk.httpclient.HttpClient.log=headers * -Djdk.httpclient.HttpClient.log=headers
* UnauthorizedTest * UnauthorizedTest
@ -66,6 +59,8 @@ import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandlers; import java.net.http.HttpResponse.BodyHandlers;
import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutionException;
import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicLong;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import static java.lang.System.out; import static java.lang.System.out;
import static java.nio.charset.StandardCharsets.UTF_8; import static java.nio.charset.StandardCharsets.UTF_8;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2021, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,15 +26,8 @@
* @bug 8276774 * @bug 8276774
* @summary Test that user-supplied cookies are appended to * @summary Test that user-supplied cookies are appended to
* server-cookies for HTTP/2 vs HTTP/1.1 * server-cookies for HTTP/2 vs HTTP/1.1
* @modules java.base/sun.net.www.http * @library /test/lib /test/jdk/java/net/httpclient/lib
* java.net.http/jdk.internal.net.http.common * @build jdk.httpclient.test.lib.common.HttpServerAdapters jdk.test.lib.net.SimpleSSLContext
* java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack
* java.logging
* jdk.httpserver
* @library /test/lib http2/server
* @build Http2TestServer
* @build jdk.test.lib.net.SimpleSSLContext
* @run testng/othervm * @run testng/othervm
* -Djdk.tls.acknowledgeCloseNotify=true * -Djdk.tls.acknowledgeCloseNotify=true
* -Djdk.httpclient.HttpClient.log=trace,headers,requests * -Djdk.httpclient.HttpClient.log=trace,headers,requests
@ -72,6 +65,8 @@ import java.util.stream.Collectors;
import java.util.stream.Stream; import java.util.stream.Stream;
import javax.net.ServerSocketFactory; import javax.net.ServerSocketFactory;
import javax.net.ssl.SSLContext; import javax.net.ssl.SSLContext;
import jdk.httpclient.test.lib.common.HttpServerAdapters;
import jdk.httpclient.test.lib.http2.Http2TestServer;
import com.sun.net.httpserver.HttpServer; import com.sun.net.httpserver.HttpServer;
import com.sun.net.httpserver.HttpsConfigurator; import com.sun.net.httpserver.HttpsConfigurator;

Some files were not shown because too many files have changed in this diff Show More