JDK 9 RFR of 8175042: Add success message to java/io/FileInputStream/LargeFileAvailable.java

Martin Buchholz martinrb at google.com
Wed Feb 15 21:48:58 UTC 2017


I don't like these "success" messages.  I think they're appropriate for
debugging, but not the final form of a test.

The call to flush() is likely a no-op; see Java Puzzlers item "Charred
beyond recognition."

If the main method fails to terminate, then  jtreg will catch that, and
more usefully, recent jtregs will show a stack trace of the final hung state

On Wed, Feb 15, 2017 at 1:04 PM, Brian Burkhalter <
brian.burkhalter at oracle.com> wrote:

> Please review this trivial fix [1] for [2]. The intent is to add to the
> test log evidence that the test in fact completed. Also cf. [3].
>
> Thanks,
>
> Brian
>
> [1] diff
>
> --- a/test/java/io/FileInputStream/LargeFileAvailable.java
> +++ b/test/java/io/FileInputStream/LargeFileAvailable.java
> @@ -71,6 +71,9 @@
>          } finally {
>              file.delete();
>          }
> +
> +        System.out.println("Test succeeded.");
> +        System.out.flush();
>      }
>
> [2] https://bugs.openjdk.java.net/browse/JDK-8175042
> [3] http://mail.openjdk.java.net/pipermail/nio-dev/2017-
> February/004130.html


More information about the core-libs-dev mailing list