RFR (XS) 8202360: [TESTBUG] runtime/LoadClass/TestResize.java needs to print output when it fails
david.holmes at oracle.com
Tue May 29 21:28:31 UTC 2018
On 30/05/2018 1:36 AM, Gerard Ziemski wrote:
>> On May 28, 2018, at 6:05 PM, David Holmes <david.holmes at oracle.com> wrote:
>>>> String already has a contains method you don't need to write your own helper.
>>> String.contains(CharSequence s) API takes CharSequence, not String.
>> A String is a CharSequence (as is a StringBuffer, StringBuilder).
> Learned something new, fixed.
>>>> I don't see why you stopped using BufferedReader to read each line, and replaced with Scanner.
>>> Personally, I find it simpler to convert the entire output into String, which then can be tokenized into lines, which then can be looked at one at a time in a simple “for loop”. This also avoids the issue of remembering to consume all the output to unblock the process.
>> Then you could just use OutputAnalyzer which already provides the output as a String that you can either parse or search.
> Now that you told me this I had to simplify the test by using the OutputAnalyzer.
:) Okay. Only minor thing is that:
should be up at line 72 - otherwise you might report failure after
No need to see updated webrev.
More information about the hotspot-runtime-dev