23 |
23 |
24 /* |
24 /* |
25 * @test |
25 * @test |
26 * @summary Test for CONTINUATION frame handling |
26 * @summary Test for CONTINUATION frame handling |
27 * @modules java.base/sun.net.www.http |
27 * @modules java.base/sun.net.www.http |
28 * jdk.incubator.httpclient/jdk.incubator.http.internal.common |
28 * java.net.http/java.net.http.internal.common |
29 * jdk.incubator.httpclient/jdk.incubator.http.internal.frame |
29 * java.net.http/java.net.http.internal.frame |
30 * jdk.incubator.httpclient/jdk.incubator.http.internal.hpack |
30 * java.net.http/java.net.http.internal.hpack |
31 * @library /lib/testlibrary server |
31 * @library /lib/testlibrary server |
32 * @build Http2TestServer |
32 * @build Http2TestServer |
33 * @build jdk.testlibrary.SimpleSSLContext |
33 * @build jdk.testlibrary.SimpleSSLContext |
34 * @run testng/othervm ContinuationFrameTest |
34 * @run testng/othervm ContinuationFrameTest |
35 */ |
35 */ |
42 import java.util.ArrayList; |
42 import java.util.ArrayList; |
43 import java.util.List; |
43 import java.util.List; |
44 import java.util.function.BiFunction; |
44 import java.util.function.BiFunction; |
45 import javax.net.ssl.SSLContext; |
45 import javax.net.ssl.SSLContext; |
46 import javax.net.ssl.SSLSession; |
46 import javax.net.ssl.SSLSession; |
47 import jdk.incubator.http.HttpClient; |
47 import java.net.http.HttpClient; |
48 import jdk.incubator.http.HttpRequest; |
48 import java.net.http.HttpRequest; |
49 import jdk.incubator.http.HttpResponse; |
49 import java.net.http.HttpResponse; |
50 import jdk.incubator.http.internal.common.HttpHeadersImpl; |
50 import java.net.http.internal.common.HttpHeadersImpl; |
51 import jdk.incubator.http.internal.frame.ContinuationFrame; |
51 import java.net.http.internal.frame.ContinuationFrame; |
52 import jdk.incubator.http.internal.frame.HeaderFrame; |
52 import java.net.http.internal.frame.HeaderFrame; |
53 import jdk.incubator.http.internal.frame.HeadersFrame; |
53 import java.net.http.internal.frame.HeadersFrame; |
54 import jdk.incubator.http.internal.frame.Http2Frame; |
54 import java.net.http.internal.frame.Http2Frame; |
55 import jdk.testlibrary.SimpleSSLContext; |
55 import jdk.testlibrary.SimpleSSLContext; |
56 import org.testng.annotations.AfterTest; |
56 import org.testng.annotations.AfterTest; |
57 import org.testng.annotations.BeforeTest; |
57 import org.testng.annotations.BeforeTest; |
58 import org.testng.annotations.DataProvider; |
58 import org.testng.annotations.DataProvider; |
59 import org.testng.annotations.Test; |
59 import org.testng.annotations.Test; |
60 import static java.lang.System.out; |
60 import static java.lang.System.out; |
61 import static jdk.incubator.http.HttpClient.Version.HTTP_2; |
61 import static java.net.http.HttpClient.Version.HTTP_2; |
62 import static jdk.incubator.http.HttpRequest.BodyPublisher.fromString; |
62 import static java.net.http.HttpRequest.BodyPublisher.fromString; |
63 import static jdk.incubator.http.HttpResponse.BodyHandler.asString; |
63 import static java.net.http.HttpResponse.BodyHandler.asString; |
64 import static org.testng.Assert.assertEquals; |
64 import static org.testng.Assert.assertEquals; |
65 import static org.testng.Assert.assertTrue; |
65 import static org.testng.Assert.assertTrue; |
66 |
66 |
67 public class ContinuationFrameTest { |
67 public class ContinuationFrameTest { |
68 |
68 |