mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8068385: [TESTBUG] hotspot/test/compiler/codecache/jmx/PoolsIndependenceTest.java sometimes fails(unstable behaviour)
Fixing unstable behaviour of 2 tests Reviewed-by: iignatyev
This commit is contained in:
parent
0520df8a92
commit
427f25366e
2 changed files with 10 additions and 6 deletions
|
@ -98,11 +98,13 @@ public class PoolsIndependenceTest implements NotificationListener {
|
|||
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()).
|
||||
|
|
|
@ -52,7 +52,9 @@ public class ThresholdNotificationsTest implements NotificationListener {
|
|||
|
||||
public static void main(String[] args) {
|
||||
for (BlobType bt : BlobType.getAvailable()) {
|
||||
new ThresholdNotificationsTest(bt).runTest();
|
||||
if (CodeCacheUtils.isCodeHeapPredictable(bt)) {
|
||||
new ThresholdNotificationsTest(bt).runTest();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue