test/gc/startup_warnings/TestParallelGC.java

Print this page




  21 * questions.
  22 */
  23 
  24 /*
  25 * @test TestParallelGC
  26 * @key gc
  27 * @bug 8006398
  28 * @summary Test that ParallelGC does not print a warning message
  29 * @library /testlibrary
  30 */
  31 
  32 import com.oracle.java.testlibrary.OutputAnalyzer;
  33 import com.oracle.java.testlibrary.ProcessTools;
  34 
  35 
  36 public class TestParallelGC {
  37 
  38   public static void main(String args[]) throws Exception {
  39     ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UseParallelGC", "-version");
  40     OutputAnalyzer output = new OutputAnalyzer(pb.start());
  41     output.shouldNotContain("warning");
  42     output.shouldNotContain("error");
  43     output.shouldHaveExitValue(0);
  44   }
  45 
  46 }


  21 * questions.
  22 */
  23 
  24 /*
  25 * @test TestParallelGC
  26 * @key gc
  27 * @bug 8006398
  28 * @summary Test that ParallelGC does not print a warning message
  29 * @library /testlibrary
  30 */
  31 
  32 import com.oracle.java.testlibrary.OutputAnalyzer;
  33 import com.oracle.java.testlibrary.ProcessTools;
  34 
  35 
  36 public class TestParallelGC {
  37 
  38   public static void main(String args[]) throws Exception {
  39     ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UseParallelGC", "-version");
  40     OutputAnalyzer output = new OutputAnalyzer(pb.start());
  41     output.shouldNotContain("deprecated");
  42     output.shouldNotContain("error");
  43     output.shouldHaveExitValue(0);
  44   }
  45 
  46 }