Mercurial > hg > openjdk > lambda > jdk
changeset 10545:bb4b1e1e390d
7144200: java/lang/management/ClassLoadingMXBean/LoadCounts.java failed with JFR enabled
Summary: Make the test less stringent by not requiring the number of loaded classes to increase by a specific number
Reviewed-by: sla
author | jbachorik |
---|---|
date | Thu, 31 Oct 2013 11:59:09 +0100 |
parents | 18c111c17231 |
children | 82ee370c3d7e |
files | test/ProblemList.txt test/java/lang/management/ClassLoadingMXBean/LoadCounts.java |
diffstat | 2 files changed, 10 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/test/ProblemList.txt Thu Oct 31 11:59:04 2013 +0100 +++ b/test/ProblemList.txt Thu Oct 31 11:59:09 2013 +0100 @@ -312,9 +312,6 @@ # 8007410 tools/launcher/FXLauncherTest.java linux-all -# 7144200 -java/lang/management/ClassLoadingMXBean/LoadCounts.java generic-all - ############################################################################ # jdk_jdi
--- a/test/java/lang/management/ClassLoadingMXBean/LoadCounts.java Thu Oct 31 11:59:04 2013 +0100 +++ b/test/java/lang/management/ClassLoadingMXBean/LoadCounts.java Thu Oct 31 11:59:09 2013 +0100 @@ -28,10 +28,10 @@ * ClassLoadingMXBean.getTotalLoadedClassCount() * ClassLoadingMXBean.getUnloadedClassCount() * @author Alexei Guibadoulline + * @run main/othervm LoadCounts */ import java.lang.management.*; -import java.util.*; public class LoadCounts { private static ClassLoadingMXBean mbean @@ -55,13 +55,15 @@ throw new RuntimeException("getLoadedClassCount() > " + "getTotalLoadedClassCount()"); - if (classesNowPrev + 4 != classesNow) + if (classesNowPrev + 4 > classesNow) throw new RuntimeException("Number of loaded classes is " + + "expected to be at least " + (classesNowPrev + 4) + ", but " + "MBean.getLoadedClassCount() returned " + classesNow); - if (classesTotalPrev + 4 != classesTotal) + if (classesTotalPrev + 4 > classesTotal) throw new RuntimeException("Total number of loaded classes is " + + "expected to be at least " + (classesTotalPrev + 4) + ", but " + "MBean.getTotalLoadedClassCount() " + "returned " + classesTotal); @@ -95,13 +97,15 @@ // Expected 2 classes got loaded since they are loaded by // same defining class loader - if (classesNowPrev + 2 != classesNow) - throw new RuntimeException("Expected Number of loaded classes is " + if (classesNowPrev + 2 > classesNow) + throw new RuntimeException("Number of loaded classes is " + + "expected to be at least " + (classesNowPrev + 4) + ", but " + "MBean.getLoadedClassCount() returned " + classesNow); - if (classesTotalPrev + 2 != classesTotal) + if (classesTotalPrev + 2 > classesTotal) throw new RuntimeException("Total number of loaded classes is " + + "expected to be at least " + (classesTotalPrev + 4) + ", but " + "MBean.getTotalLoadedClassCount() " + "returned " + classesTotal);