test/gc/arguments/TestParallelGCThreads.java

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

@@ -25,12 +25,11 @@
  * @test TestParallelGCThreads
  * @key gc
  * @bug 8059527
  * @summary Tests argument processing for ParallelGCThreads
  * @library /testlibrary
- * @build TestParallelGCThreads FlagsValue
- * @run main/othervm TestParallelGCThreads
+ * @run driver TestParallelGCThreads
  */
 
 import com.oracle.java.testlibrary.*;
 
 public class TestParallelGCThreads {

@@ -48,13 +47,11 @@
 
       // 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);
-        }
+        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 {