test/gc/parallelScavenge/TestDynShrinkHeap.java
Print this page
rev 7806 : 8051984: @ignore should be placed after @test
Summary: as ignore reason has been fixed (by adding @requires) @ignore removed
Reviewed-by:
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -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,