8230000: some httpclients testng tests run zero test
authordfuchs
Mon, 26 Aug 2019 14:48:12 +0100
changeset 57880 ff08db52ad92
parent 57879 095c2f21dd10
child 57881 c414c554b38b
8230000: some httpclients testng tests run zero test Summary: 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 Contributed-by: Julia Boes <julia.boes@oracle.com>
test/jdk/java/net/httpclient/AbstractThrowingPushPromises.java
test/jdk/java/net/httpclient/LineStreamsAndSurrogatesTest.java
test/jdk/java/net/httpclient/LineSubscribersAndSurrogatesTest.java
--- a/test/jdk/java/net/httpclient/AbstractThrowingPushPromises.java	Mon Aug 26 12:25:49 2019 +0100
+++ b/test/jdk/java/net/httpclient/AbstractThrowingPushPromises.java	Mon Aug 26 14:48:12 2019 +0100
@@ -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.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -21,18 +21,24 @@
  * questions.
  */
 
-/*
- * @test
- * @summary Tests what happens when push promise handlers and their
- *          response body handlers and subscribers throw unexpected exceptions.
+
+/**
+ * This is not a test. Actual tests are implemented by concrete subclasses.
+ * 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
  * @build jdk.test.lib.net.SimpleSSLContext HttpServerAdapters
-  *       ReferenceTracker AbstractThrowingPushPromises
+ *        ReferenceTracker AbstractThrowingPushPromises
+ *        <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 AbstractThrowingPushPromises
+ * @run testng/othervm -Djdk.internal.httpclient.debug=true <concrete-class-name>
  */
 
 import jdk.test.lib.net.SimpleSSLContext;
--- a/test/jdk/java/net/httpclient/LineStreamsAndSurrogatesTest.java	Mon Aug 26 12:25:49 2019 +0100
+++ b/test/jdk/java/net/httpclient/LineStreamsAndSurrogatesTest.java	Mon Aug 26 14:48:12 2019 +0100
@@ -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.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -61,7 +61,7 @@
     }
 
     @Test
-    void testUncomplete() throws Exception {
+    public void testUncomplete() throws Exception {
         // 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" +
                 " fr\u00f4\ud801\udc00des\r\n t\u00e9n\u00e8bres\ud801\udc00";
@@ -121,7 +121,7 @@
     }
 
     @Test
-    void testStream1() throws Exception {
+    public void testStream1() throws Exception {
         // 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" +
                 " fr\u00f4\ud801\udc00des\r\n t\u00e9n\u00e8bres";
@@ -170,7 +170,7 @@
 
 
     @Test
-    void testStream2() throws Exception {
+    public void testStream2() throws Exception {
         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";
         Charset charset = UTF_8;
@@ -216,7 +216,7 @@
     }
 
     @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
         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";
@@ -263,7 +263,7 @@
 
 
     @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" +
                 " les fr\u00f4\ud801\udc00des\r\n t\u00e9n\u00e8bres\r\r";
         Charset charset = UTF_16;
--- a/test/jdk/java/net/httpclient/LineSubscribersAndSurrogatesTest.java	Mon Aug 26 12:25:49 2019 +0100
+++ b/test/jdk/java/net/httpclient/LineSubscribersAndSurrogatesTest.java	Mon Aug 26 14:48:12 2019 +0100
@@ -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.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -81,7 +81,7 @@
     }
 
     @Test
-    void testIncomplete() throws Exception {
+    public void testIncomplete() throws Exception {
         // 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 fr\u00f4\ud801\udc00des\r\n t\u00e9n\u00e8bres\ud801\udc00";
@@ -123,7 +123,7 @@
 
 
     @Test
-    void testStringWithFinisherLF() throws Exception {
+    public void testStringWithFinisherLF() throws Exception {
         // 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 fr\u00f4\ud801\udc00des\r\n t\u00e9n\u00e8bres\r";
@@ -155,7 +155,7 @@
 
 
     @Test
-    void testStringWithFinisherCR() throws Exception {
+    public void testStringWithFinisherCR() throws Exception {
         String text = "Bient\u00f4t\r\n nous plongerons\r\n dans\r" +
                 " les fr\u00f4\ud801\udc00des\r\n t\u00e9n\u00e8bres\r\r";
         ObjectSubscriber subscriber = new ObjectSubscriber();
@@ -183,7 +183,7 @@
     }
 
     @Test
-    void testStringWithFinisherCRLF() throws Exception {
+    public void testStringWithFinisherCRLF() throws Exception {
         String text = "Bient\u00f4t\r\n nous plongerons\r\n dans\r" +
                 " les fr\u00f4\ud801\udc00des\r\n t\u00e9n\u00e8bres";
         ObjectSubscriber subscriber = new ObjectSubscriber();
@@ -210,7 +210,7 @@
 
 
     @Test
-    void testStringWithFinisherBR() throws Exception {
+    public void testStringWithFinisherBR() throws Exception {
         String text = "Bient\u00f4t\r\n nous plongerons\r\n dans\r" +
                 " les\r\r fr\u00f4\ud801\udc00des\r\n t\u00e9n\u00e8bres";
         ObjectSubscriber subscriber = new ObjectSubscriber();
@@ -240,7 +240,7 @@
     }
 
     @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" +
                 " les\r\r fr\u00f4\ud801\udc00des\r\n t\u00e9n\u00e8bres\r\r";
         ObjectSubscriber subscriber = new ObjectSubscriber();