# HG changeset patch # User jbachorik # Date 1383217149 -3600 # Node ID bb4b1e1e390df22116c1ba741a37ce94cf2e2f98 # Parent 18c111c172313d39d13e52b3c08531181159c0e1 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 diff -r 18c111c17231 -r bb4b1e1e390d test/ProblemList.txt --- 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 diff -r 18c111c17231 -r bb4b1e1e390d test/java/lang/management/ClassLoadingMXBean/LoadCounts.java --- 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);