# HG changeset patch # User dpochepk # Date 1421427563 -14400 # Node ID 509f04dcfa9f85dd6b990e53d0c6b196384e6725 # Parent a42fefc699225541c44f832ca4a2e7cb0a77e0f1 8068385: [TESTBUG] hotspot/test/compiler/codecache/jmx/PoolsIndependenceTest.java sometimes fails(unstable behaviour) Summary: fixing unstable behaviour of 2 tests Reviewed-by: iignatyev diff -r a42fefc69922 -r 509f04dcfa9f hotspot/test/compiler/codecache/jmx/PoolsIndependenceTest.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()). diff -r a42fefc69922 -r 509f04dcfa9f hotspot/test/compiler/codecache/jmx/ThresholdNotificationsTest.java --- 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(); + } } }