8230000: some httpclients testng tests run zero test

Two tests needed to declared their test methods public, the last one was a simple abstract framework for subclasses and needed its @test keyword removed.

Reviewed-by: chegar, aefimov, dfuchs
This commit is contained in:
Julia Boes 2019-08-26 14:48:12 +01:00 committed by Daniel Fuchs
parent 1d67d474a5
commit fb3b0ab1fb
3 changed files with 26 additions and 20 deletions

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2019, 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
@ -21,18 +21,24 @@
* questions. * questions.
*/ */
/*
* @test /**
* @summary Tests what happens when push promise handlers and their * This is not a test. Actual tests are implemented by concrete subclasses.
* response body handlers and subscribers throw unexpected exceptions. * The abstract class AbstractThrowingPushPromises provides a base framework
* to test what happens when push promise handlers and their
* response body handlers and subscribers throw unexpected exceptions.
* Concrete tests that extend this abstract class will need to include
* the following jtreg tags:
*
* @library /test/lib http2/server * @library /test/lib http2/server
* @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters
* ReferenceTracker AbstractThrowingPushPromises * ReferenceTracker AbstractThrowingPushPromises
* <concrete-class-name>
* @modules java.base/sun.net.www.http * @modules java.base/sun.net.www.http
* java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.common
* java.net.http/jdk.internal.net.http.frame * java.net.http/jdk.internal.net.http.frame
* java.net.http/jdk.internal.net.http.hpack * java.net.http/jdk.internal.net.http.hpack
* @run testng/othervm -Djdk.internal.httpclient.debug=true AbstractThrowingPushPromises * @run testng/othervm -Djdk.internal.httpclient.debug=true <concrete-class-name>
*/ */
import jdk.test.lib.net.SimpleSSLContext; import jdk.test.lib.net.SimpleSSLContext;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2019, 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
@ -61,7 +61,7 @@ public class LineStreamsAndSurrogatesTest {
} }
@Test @Test
void testUncomplete() throws Exception { public void testUncomplete() throws Exception {
// Uses U+10400 which is encoded as the surrogate pair U+D801 U+DC00 // Uses U+10400 which is encoded as the surrogate pair U+D801 U+DC00
String text = "Bient\u00f4t\r\n nous plongerons\r\n dans\r les\n\n" + String text = "Bient\u00f4t\r\n nous plongerons\r\n dans\r les\n\n" +
" fr\u00f4\ud801\udc00des\r\n t\u00e9n\u00e8bres\ud801\udc00"; " fr\u00f4\ud801\udc00des\r\n t\u00e9n\u00e8bres\ud801\udc00";
@ -121,7 +121,7 @@ public class LineStreamsAndSurrogatesTest {
} }
@Test @Test
void testStream1() throws Exception { public void testStream1() throws Exception {
// Uses U+10400 which is encoded as the surrogate pair U+D801 U+DC00 // Uses U+10400 which is encoded as the surrogate pair U+D801 U+DC00
String text = "Bient\u00f4t\r\n nous plongerons\r\n dans\r\r les\n\n" + String text = "Bient\u00f4t\r\n nous plongerons\r\n dans\r\r les\n\n" +
" fr\u00f4\ud801\udc00des\r\n t\u00e9n\u00e8bres"; " fr\u00f4\ud801\udc00des\r\n t\u00e9n\u00e8bres";
@ -170,7 +170,7 @@ public class LineStreamsAndSurrogatesTest {
@Test @Test
void testStream2() throws Exception { public void testStream2() throws Exception {
String text = "Bient\u00f4t\r\n nous plongerons\r\n dans\r\r" + String text = "Bient\u00f4t\r\n nous plongerons\r\n dans\r\r" +
" les fr\u00f4\ud801\udc00des\r\n t\u00e9n\u00e8bres\r\r"; " les fr\u00f4\ud801\udc00des\r\n t\u00e9n\u00e8bres\r\r";
Charset charset = UTF_8; Charset charset = UTF_8;
@ -216,7 +216,7 @@ public class LineStreamsAndSurrogatesTest {
} }
@Test @Test
void testStream3_UTF16() throws Exception { public void testStream3_UTF16() throws Exception {
// Uses U+10400 which is encoded as the surrogate pair U+D801 U+DC00 // Uses U+10400 which is encoded as the surrogate pair U+D801 U+DC00
String text = "Bient\u00f4t\r\n nous plongerons\r\n dans\r\r" + String text = "Bient\u00f4t\r\n nous plongerons\r\n dans\r\r" +
" les\n\n fr\u00f4\ud801\udc00des\r\n t\u00e9n\u00e8bres"; " les\n\n fr\u00f4\ud801\udc00des\r\n t\u00e9n\u00e8bres";
@ -263,7 +263,7 @@ public class LineStreamsAndSurrogatesTest {
@Test @Test
void testStream4_UTF16() throws Exception { public void testStream4_UTF16() throws Exception {
String text = "Bient\u00f4t\r\n nous plongerons\r\n dans\r\r" + String text = "Bient\u00f4t\r\n nous plongerons\r\n dans\r\r" +
" les fr\u00f4\ud801\udc00des\r\n t\u00e9n\u00e8bres\r\r"; " les fr\u00f4\ud801\udc00des\r\n t\u00e9n\u00e8bres\r\r";
Charset charset = UTF_16; Charset charset = UTF_16;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2018, 2019, 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
@ -81,7 +81,7 @@ public class LineSubscribersAndSurrogatesTest {
} }
@Test @Test
void testIncomplete() throws Exception { public void testIncomplete() throws Exception {
// Uses U+10400 which is encoded as the surrogate pair U+D801 U+DC00 // Uses U+10400 which is encoded as the surrogate pair U+D801 U+DC00
String text = "Bient\u00f4t\r\n nous plongerons\r\n dans\r" + String text = "Bient\u00f4t\r\n nous plongerons\r\n dans\r" +
" les\n\n fr\u00f4\ud801\udc00des\r\n t\u00e9n\u00e8bres\ud801\udc00"; " les\n\n fr\u00f4\ud801\udc00des\r\n t\u00e9n\u00e8bres\ud801\udc00";
@ -123,7 +123,7 @@ public class LineSubscribersAndSurrogatesTest {
@Test @Test
void testStringWithFinisherLF() throws Exception { public void testStringWithFinisherLF() throws Exception {
// Uses U+10400 which is encoded as the surrogate pair U+D801 U+DC00 // Uses U+10400 which is encoded as the surrogate pair U+D801 U+DC00
String text = "Bient\u00f4t\r\n nous plongerons\r\n dans\r" + String text = "Bient\u00f4t\r\n nous plongerons\r\n dans\r" +
" les\n\n fr\u00f4\ud801\udc00des\r\n t\u00e9n\u00e8bres\r"; " les\n\n fr\u00f4\ud801\udc00des\r\n t\u00e9n\u00e8bres\r";
@ -155,7 +155,7 @@ public class LineSubscribersAndSurrogatesTest {
@Test @Test
void testStringWithFinisherCR() throws Exception { public void testStringWithFinisherCR() throws Exception {
String text = "Bient\u00f4t\r\n nous plongerons\r\n dans\r" + String text = "Bient\u00f4t\r\n nous plongerons\r\n dans\r" +
" les fr\u00f4\ud801\udc00des\r\n t\u00e9n\u00e8bres\r\r"; " les fr\u00f4\ud801\udc00des\r\n t\u00e9n\u00e8bres\r\r";
ObjectSubscriber subscriber = new ObjectSubscriber(); ObjectSubscriber subscriber = new ObjectSubscriber();
@ -183,7 +183,7 @@ public class LineSubscribersAndSurrogatesTest {
} }
@Test @Test
void testStringWithFinisherCRLF() throws Exception { public void testStringWithFinisherCRLF() throws Exception {
String text = "Bient\u00f4t\r\n nous plongerons\r\n dans\r" + String text = "Bient\u00f4t\r\n nous plongerons\r\n dans\r" +
" les fr\u00f4\ud801\udc00des\r\n t\u00e9n\u00e8bres"; " les fr\u00f4\ud801\udc00des\r\n t\u00e9n\u00e8bres";
ObjectSubscriber subscriber = new ObjectSubscriber(); ObjectSubscriber subscriber = new ObjectSubscriber();
@ -210,7 +210,7 @@ public class LineSubscribersAndSurrogatesTest {
@Test @Test
void testStringWithFinisherBR() throws Exception { public void testStringWithFinisherBR() throws Exception {
String text = "Bient\u00f4t\r\n nous plongerons\r\n dans\r" + String text = "Bient\u00f4t\r\n nous plongerons\r\n dans\r" +
" les\r\r fr\u00f4\ud801\udc00des\r\n t\u00e9n\u00e8bres"; " les\r\r fr\u00f4\ud801\udc00des\r\n t\u00e9n\u00e8bres";
ObjectSubscriber subscriber = new ObjectSubscriber(); ObjectSubscriber subscriber = new ObjectSubscriber();
@ -240,7 +240,7 @@ public class LineSubscribersAndSurrogatesTest {
} }
@Test @Test
void testStringWithFinisherBR_UTF_16() throws Exception { public void testStringWithFinisherBR_UTF_16() throws Exception {
String text = "Bient\u00f4t\r\n nous plongerons\r\n dans\r" + String text = "Bient\u00f4t\r\n nous plongerons\r\n dans\r" +
" les\r\r fr\u00f4\ud801\udc00des\r\n t\u00e9n\u00e8bres\r\r"; " les\r\r fr\u00f4\ud801\udc00des\r\n t\u00e9n\u00e8bres\r\r";
ObjectSubscriber subscriber = new ObjectSubscriber(); ObjectSubscriber subscriber = new ObjectSubscriber();