RFR: JDK-8178508 Co-locate remaining MM tests

Mandy Chung mandy.chung at oracle.com
Mon Jun 5 16:59:13 UTC 2017


> On Jun 5, 2017, at 9:48 AM, Mandy Chung <mandy.chung at oracle.com> wrote:
> 
> 
>>> 
>>> On 5/31/2017 10:32 AM, Ujwal Vangapally wrote:
>>>> webrev : 
>>>> http://cr.openjdk.java.net/~uvangapally/webrev/2017/8178508/webrev.00/ <http://cr.openjdk.java.net/~uvangapally/webrev/2017/8178508/webrev.00/>
> 
> The test should be in  test/java/lang/management/MemoryPoolMXBean since it’s a test for that API.  I also suggest to rename the test to LargeHeapThresholdTest (or something like that).

  41  * @run main/othervm -Xmx3000M -ea MX2G
  59                 assert i.getUsageThreshold() == TWO_G : "Usage threshold for"
The test should elimiate its dependency on -ea; otherwise the test may not fail when it runs standalone without -ea.  You can eplace the assert with an if-statement to check the condition and throw a RuntimeException instead.  

Mandy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20170605/866a67b4/attachment.html>


More information about the serviceability-dev mailing list