8068385: [TESTBUG] hotspot/test/compiler/codecache/jmx/PoolsIndependenceTest.java sometimes fails(unstable behaviour)
authordpochepk
Fri, 16 Jan 2015 20:59:23 +0400
changeset 28645 509f04dcfa9f
parent 28642 a42fefc69922
child 28646 1cf6b04a87d8
8068385: [TESTBUG] hotspot/test/compiler/codecache/jmx/PoolsIndependenceTest.java sometimes fails(unstable behaviour) Summary: fixing unstable behaviour of 2 tests Reviewed-by: iignatyev
hotspot/test/compiler/codecache/jmx/PoolsIndependenceTest.java
hotspot/test/compiler/codecache/jmx/ThresholdNotificationsTest.java
--- 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();
+            }
         }
     }