hotspot/test/compiler/codecache/jmx/PoolsIndependenceTest.java
changeset 28645 509f04dcfa9f
parent 28491 fa9243da0080
child 30219 a39816ded4d8
equal deleted inserted replaced
28642:a42fefc69922 28645:509f04dcfa9f
    96                 return currentTimestamp > timeoutValue;
    96                 return currentTimestamp > timeoutValue;
    97             }
    97             }
    98             return false;
    98             return false;
    99         });
    99         });
   100         for (BlobType bt : BlobType.getAvailable()) {
   100         for (BlobType bt : BlobType.getAvailable()) {
   101             int expectedNotificationsAmount = bt.equals(btype) ? 1 : 0;
   101             if (CodeCacheUtils.isCodeHeapPredictable(bt)) {
   102             Asserts.assertEQ(counters.get(bt.getMemoryPool().getName()).get(),
   102                 int expectedNotificationsAmount = bt.equals(btype) ? 1 : 0;
   103                     expectedNotificationsAmount, String.format("Unexpected "
   103                 Asserts.assertEQ(counters.get(bt.getMemoryPool().getName()).get(),
   104                             + "amount of notifications for pool: %s",
   104                         expectedNotificationsAmount, String.format("Unexpected "
   105                             bt.getMemoryPool().getName()));
   105                                 + "amount of notifications for pool: %s",
       
   106                                 bt.getMemoryPool().getName()));
       
   107             }
   106         }
   108         }
   107         try {
   109         try {
   108             ((NotificationEmitter) ManagementFactory.getMemoryMXBean()).
   110             ((NotificationEmitter) ManagementFactory.getMemoryMXBean()).
   109                     removeNotificationListener(this);
   111                     removeNotificationListener(this);
   110         } catch (ListenerNotFoundException ex) {
   112         } catch (ListenerNotFoundException ex) {