8326121: vmTestbase/gc/g1/unloading/tests/unloading_keepRef_rootClass_inMemoryCompilation_keep_cl failed with Full gc happened. Test was useless.
Reviewed-by: tschatzl, ayang
This commit is contained in:
parent
286cc163fd
commit
2b4a4b7bd8
@ -150,8 +150,6 @@ public class UnloadingTest extends GCTestBase {
|
||||
}
|
||||
|
||||
private static void checkGCCounters() {
|
||||
// System.out.println("WhiteBox.getWhiteBox().g1GetTotalCollections() = \t" + WhiteBox.getWhiteBox().g1GetTotalCollections());
|
||||
// System.out.println("WhiteBox.getWhiteBox().g1GetTotalFullCollections() = \t" + WhiteBox.getWhiteBox().g1GetTotalFullCollections());
|
||||
GarbageCollectorMXBean oldGenBean = null;
|
||||
for (GarbageCollectorMXBean bean : ManagementFactory.getGarbageCollectorMXBeans()) {
|
||||
System.out.println("bean.getName() = \t\"" + bean.getName() + "\", bean.getCollectionCount() = \t" + bean.getCollectionCount());
|
||||
@ -159,9 +157,9 @@ public class UnloadingTest extends GCTestBase {
|
||||
oldGenBean = bean;
|
||||
}
|
||||
}
|
||||
// if (WhiteBox.getWhiteBox().g1GetTotalFullCollections() != 0 || (oldGenBean != null && oldGenBean.getCollectionCount() != 0)) {
|
||||
|
||||
if (oldGenBean != null && oldGenBean.getCollectionCount() != 0) {
|
||||
throw new RuntimeException("Full gc happened. Test was useless.");
|
||||
throw new SkippedException("Full gc happened, skip the test.");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,8 @@
|
||||
|
||||
package nsk.share.test;
|
||||
|
||||
import jtreg.SkippedException;
|
||||
|
||||
import nsk.share.log.*;
|
||||
import nsk.share.runner.*;
|
||||
import nsk.share.TestFailure;
|
||||
@ -82,6 +84,8 @@ public class Tests {
|
||||
((Runnable) o).run();
|
||||
if (o instanceof TestExitCode)
|
||||
exitCode = ((TestExitCode) o).getExitCode();
|
||||
} catch (SkippedException se) {
|
||||
throw se;
|
||||
} catch (RuntimeException t) {
|
||||
getLog().error(t);
|
||||
exitCode = 97;
|
||||
|
Loading…
x
Reference in New Issue
Block a user