The test java/lang/management/MemoryMXBean/MemoryTestAllGC.sh does not take the Metaspace MemoryMXBean into account when counting the number of non-heap memory pools.
An example of a failure:
Exception in thread "main" java.lang.RuntimeException: TEST FAILED:
Number of non-heap pools = 2 but expected <= 1 and >= 1
at MemoryTest.checkMemoryPools(MemoryTest.java:113)
at MemoryTest.main(MemoryTest.java:75)
An example of a failure:
Exception in thread "main" java.lang.RuntimeException: TEST FAILED:
Number of non-heap pools = 2 but expected <= 1 and >= 1
at MemoryTest.checkMemoryPools(MemoryTest.java:113)
at MemoryTest.main(MemoryTest.java:75)
- duplicates
- 
                    JDK-8010734 NPG: The test MemoryTest.java needs to be updated to support metaspace -           
- Closed
 
-         
- relates to
- 
                    JDK-8019500 Exclude MemoryTest.java and MemoryTestAllGC.sh to enable integration -           
- Closed
 
-