Please, review the following test fix: Issue: https://bugs.openjdk.java.net/browse/JDK-8020467 Webrev: http://cr.openjdk.java.net/~jbachorik/8020467/webrev.01
The test tries to make sure that the "pool usage threshold" trigger and the reported pool memory usage are not contradicting each other. The problem is that it is not possible to get the "pool usage threshold exceeded" flag and the pool memory usage atomicly in regard to the GC. Specifically, when "CMS Old Gen" pool is examined and the usage is retrieved before a GC promotes some objects to the old gen but the usage threshold is checked after the GC has promoted some instance into the old gen the test will fail.
The patch makes sure that there are some instances promoted in "CMS Old Gen" before checking the "pool usage threshold" to get semi-consistent view.
Thanks, -JB-