8068385: [TESTBUG] hotspot/test/compiler/codecache/jmx/PoolsIndependenceTest.java sometimes fails(unstable behaviour)
Summary: fixing unstable behaviour of 2 tests
Reviewed-by: iignatyev
--- a/hotspot/test/compiler/codecache/jmx/PoolsIndependenceTest.java Fri Jan 16 13:58:22 2015 +0100
+++ b/hotspot/test/compiler/codecache/jmx/PoolsIndependenceTest.java Fri Jan 16 20:59:23 2015 +0400
@@ -98,11 +98,13 @@
return false;
});
for (BlobType bt : BlobType.getAvailable()) {
- int expectedNotificationsAmount = bt.equals(btype) ? 1 : 0;
- Asserts.assertEQ(counters.get(bt.getMemoryPool().getName()).get(),
- expectedNotificationsAmount, String.format("Unexpected "
- + "amount of notifications for pool: %s",
- bt.getMemoryPool().getName()));
+ if (CodeCacheUtils.isCodeHeapPredictable(bt)) {
+ int expectedNotificationsAmount = bt.equals(btype) ? 1 : 0;
+ Asserts.assertEQ(counters.get(bt.getMemoryPool().getName()).get(),
+ expectedNotificationsAmount, String.format("Unexpected "
+ + "amount of notifications for pool: %s",
+ bt.getMemoryPool().getName()));
+ }
}
try {
((NotificationEmitter) ManagementFactory.getMemoryMXBean()).
--- a/hotspot/test/compiler/codecache/jmx/ThresholdNotificationsTest.java Fri Jan 16 13:58:22 2015 +0100
+++ b/hotspot/test/compiler/codecache/jmx/ThresholdNotificationsTest.java Fri Jan 16 20:59:23 2015 +0400
@@ -52,7 +52,9 @@
public static void main(String[] args) {
for (BlobType bt : BlobType.getAvailable()) {
- new ThresholdNotificationsTest(bt).runTest();
+ if (CodeCacheUtils.isCodeHeapPredictable(bt)) {
+ new ThresholdNotificationsTest(bt).runTest();
+ }
}
}