test/gc/startup_warnings/TestParNewCMS.java

Print this page




  21 * questions.
  22 */
  23 
  24 /*
  25 * @test TestParNewCMS
  26 * @key gc
  27 * @bug 8006398
  28 * @summary Test that the combination ParNew+CMS 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 TestParNewCMS {
  37 
  38   public static void main(String args[]) throws Exception {
  39     ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UseParNewGC", "-XX:+UseConcMarkSweepGC", "-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 TestParNewCMS
  26 * @key gc
  27 * @bug 8006398
  28 * @summary Test that the combination ParNew+CMS 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 TestParNewCMS {
  37 
  38   public static void main(String args[]) throws Exception {
  39     ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UseParNewGC", "-XX:+UseConcMarkSweepGC", "-version");
  40     OutputAnalyzer output = new OutputAnalyzer(pb.start());
  41     output.shouldNotContain("deprecated");
  42     output.shouldNotContain("error");
  43     output.shouldHaveExitValue(0);
  44   }
  45 
  46 }