RFR (XS) 8202360: [TESTBUG] runtime/LoadClass/TestResize.java needs to print output when it fails

David Holmes david.holmes at oracle.com
Mon May 21 22:34:19 UTC 2018


Hi Gerard,

<trimming>

On 22/05/2018 6:57 AM, Gerard Ziemski wrote:
>> On May 20, 2018, at 8:38 PM, David Holmes <david.holmes at oracle.com> wrote:
>> Okay - that helps with the immediate problem I had. I also now realize that the failure in this test is showing is that the SD did not in fact re-size as expected!
> 
> Can you elaborate? Is there a reproducible case I can try to run?

The test's purpose is to check that the SD resizes, so if it finds a 
load factor too high (which indicates it didn't resize) then the SD 
resizing logic has either not worked as expected, or the test is not 
doing what it thinks!

> I have re-done the main logic a bit to simplify it, and not have to do either String and “+” nor StringBuffer, by taking advantage of the fact that the info we need to parse is on the 2nd output line.

I was under the impression that we could see multiple lines of the form:

Java dictionary (table_size=40423, classes=50002)

as the table resized. If that is not the case then none of the output 
seems relevant to me except for this one line. ??

Thanks,
David
-----


> 
>> 88           System.out.println(string_out);
>>
>> Please precede with a comment
>>
>> // We've hit an error so print all of the output parsed so far, and
>> // then the remaining output.
> 
> Done.
> 
> 
>>
>> 93           throw new RuntimeException("Load factor too high, expected MAX "+MAX_LOAD_FACTOR+", got "+loadFactor+" [table size "+table_size+", number of clases "+classes+"]");
>>
>>
>> Please split this line up to make it much shorter. I'm tempted to ask you to fix this missing spaces around the '+' operator but that bad-style is prevalent throughout this test. (This violates a number of Java style rules.)
> 
> Done and done.
> 
> 
>>
>> Don't forget to add second copyright year.
> 
> Done.
> 
> After all the feedback I like the code much better now. Thank you for thorough review and the detailed feedback.
> 
> https://bugs.openjdk.java.net/browse/JDK-8202360
> http://cr.openjdk.java.net/~gziemski/8202360_rev3
> 
> 
> cheers
> 


More information about the hotspot-runtime-dev mailing list