|
The test tries to force a GC cleanup by pushing the PermGen to its limit. But PermGen was removed in JDK 8. So under JDK 8, this test will just keep going, expanding the memory dynamically based on the native memory available.
One thing we can do is use the new flag MaxMetaspaceSize to limit the available memory. I tried -XX:MaxMetaspaceSize=128m and the test took about 21s.
|