changeset 7856:a562f4eeaa81

8068385: [TESTBUG] hotspot/test/compiler/codecache/jmx/PoolsIndependenceTest.java sometimes fails(unstable behaviour) Summary: fixing unstable behaviour of 2 tests Reviewed-by: iignatyev
author dpochepk
date Fri, 16 Jan 2015 20:59:23 +0400
parents 8596a20c8de1
children 782cedc93dd1
files test/compiler/codecache/jmx/PoolsIndependenceTest.java test/compiler/codecache/jmx/ThresholdNotificationsTest.java
diffstat 2 files changed, 10 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/test/compiler/codecache/jmx/PoolsIndependenceTest.java	Fri Jan 16 13:58:22 2015 +0100
+++ b/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/test/compiler/codecache/jmx/ThresholdNotificationsTest.java	Fri Jan 16 13:58:22 2015 +0100
+++ b/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();
+            }
         }
     }