test/gc/arguments/TestParallelGCThreads.java

Print this page
rev 7141 : [mq]: 8059527
rev 7142 : [mq]: review

*** 25,36 **** * @test TestParallelGCThreads * @key gc * @bug 8059527 * @summary Tests argument processing for ParallelGCThreads * @library /testlibrary ! * @build TestParallelGCThreads FlagsValue ! * @run main/othervm TestParallelGCThreads */ import com.oracle.java.testlibrary.*; public class TestParallelGCThreads { --- 25,35 ---- * @test TestParallelGCThreads * @key gc * @bug 8059527 * @summary Tests argument processing for ParallelGCThreads * @library /testlibrary ! * @run driver TestParallelGCThreads */ import com.oracle.java.testlibrary.*; public class TestParallelGCThreads {
*** 48,60 **** // Do some basic testing to ensure the flag updates the count for (long i = 1; i <= 3; i++) { flags = new String[] {"-XX:+Use" + gc + "GC", "-XX:ParallelGCThreads=" + i, "-XX:+PrintFlagsFinal", "-version"}; long count = getParallelGCThreadCount(flags); ! if (count != i) { ! throw new RuntimeException("Specifying ParallelGCThreads=" + i + " for " + gc + "GC does not set the thread count properly! Count found was " + count); ! } } } } public static long getParallelGCThreadCount(String flags[]) throws Exception { --- 47,57 ---- // Do some basic testing to ensure the flag updates the count for (long i = 1; i <= 3; i++) { flags = new String[] {"-XX:+Use" + gc + "GC", "-XX:ParallelGCThreads=" + i, "-XX:+PrintFlagsFinal", "-version"}; long count = getParallelGCThreadCount(flags); ! Asserts.assertEQ(count, i, "Specifying ParallelGCThreads=" + i + " for " + gc + "GC does not set the thread count properly!"); } } } public static long getParallelGCThreadCount(String flags[]) throws Exception {