test/gc/parallelScavenge/TestDynShrinkHeap.java

Print this page
rev 7806 : [mq]: TestDynShrinkHeapIgnore.patch

@@ -20,11 +20,10 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
 
 /**
- * @ignore 8019361
  * @test TestDynShrinkHeap
  * @bug 8016479
  * @requires vm.gc=="Parallel" | vm.gc=="null"
  * @summary Verify that the heap shrinks after full GC according to the current values of the Min/MaxHeapFreeRatio flags
  * @library /testlibrary

@@ -33,11 +32,11 @@
 import com.oracle.java.testlibrary.DynamicVMOption;
 import java.lang.management.ManagementFactory;
 import java.lang.management.MemoryUsage;
 import java.util.ArrayList;
 import sun.management.ManagementFactoryHelper;
-import static com.oracle.java.testlibrary.Asserts.*;
+import com.oracle.java.testlibrary.Asserts;
 
 public class TestDynShrinkHeap {
 
     public static final String MIN_FREE_RATIO_FLAG_NAME = "MinHeapFreeRatio";
     public static final String MAX_FREE_RATIO_FLAG_NAME = "MaxHeapFreeRatio";

@@ -58,11 +57,11 @@
 
         free();
         MemoryUsagePrinter.printMemoryUsage("free");
         MemoryUsage muFree = ManagementFactory.getMemoryMXBean().getHeapMemoryUsage();
 
-        assertLessThan(muFree.getCommitted(), muFull.getCommitted(), String.format(
+        Asserts.assertLessThan(muFree.getCommitted(), muFull.getCommitted(), String.format(
                 "committed free heap size is not less than committed full heap size, heap hasn't been shrunk?%n"
                 + "%s = %s%n%s = %s",
                 MIN_FREE_RATIO_FLAG_NAME,
                 ManagementFactoryHelper.getDiagnosticMXBean().getVMOption(MIN_FREE_RATIO_FLAG_NAME).getValue(),
                 MAX_FREE_RATIO_FLAG_NAME,