7144200: java/lang/management/ClassLoadingMXBean/LoadCounts.java failed with JFR enabled
Make the test less stringent by not requiring the number of loaded classes to increase by a specific number Reviewed-by: sla
This commit is contained in:
parent
894f3788d3
commit
21a239f4c5
@ -312,9 +312,6 @@ tools/pack200/Pack200Test.java solaris-all, mac
|
||||
# 8007410
|
||||
tools/launcher/FXLauncherTest.java linux-all
|
||||
|
||||
# 7144200
|
||||
java/lang/management/ClassLoadingMXBean/LoadCounts.java generic-all
|
||||
|
||||
############################################################################
|
||||
|
||||
# jdk_jdi
|
||||
|
@ -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 @@ public class LoadCounts {
|
||||
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 @@ public class LoadCounts {
|
||||
|
||||
// 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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user