Java Code Examples for com.oracle.java.testlibrary.OutputAnalyzer#shouldNotContain()

The following examples show how to use com.oracle.java.testlibrary.OutputAnalyzer#shouldNotContain() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TestVerifySubSet.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public static void main(String args[]) throws Exception {

        OutputAnalyzer output;

        output = runTest("heap, threads, codecache, metaspace");
        output.shouldContain("Heap");
        output.shouldContain("Threads");
        output.shouldContain("CodeCache");
        output.shouldContain("MetaspaceAux");
        output.shouldNotContain("SymbolTable");
        output.shouldNotContain("StringTable");
        output.shouldNotContain("SystemDictionary");
        output.shouldNotContain("CodeCache Oops");
        output.shouldHaveExitValue(0);

        output = runTest("hello, threads, codecache, metaspace");
        output.shouldContain("memory sub-system is unknown, please correct it");
        output.shouldNotContain("Threads");
        output.shouldNotContain("CodeCache");
        output.shouldNotContain("MetaspaceAux");
        output.shouldHaveExitValue(1);
    }
 
Example 2
Source File: TestCMSForegroundFlags.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public static void main(String[] args) throws Exception {
  if (args.length != 2) {
    throw new Exception("Expected two arguments,flagValue and flagName");
  }
  String flagValue = args[0];
  String flagName = args[1];

  ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(flagValue, "-version");
  OutputAnalyzer output = new OutputAnalyzer(pb.start());
  output.shouldContain("warning: " + flagName + " is deprecated and will likely be removed in a future release.");
  output.shouldNotContain("error");
  output.shouldHaveExitValue(0);
}
 
Example 3
Source File: TestCMSForegroundFlags.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public static void main(String[] args) throws Exception {
  if (args.length != 2) {
    throw new Exception("Expected two arguments,flagValue and flagName");
  }
  String flagValue = args[0];
  String flagName = args[1];

  ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(flagValue, "-version");
  OutputAnalyzer output = new OutputAnalyzer(pb.start());
  output.shouldContain("warning: " + flagName + " is deprecated and will likely be removed in a future release.");
  output.shouldNotContain("error");
  output.shouldHaveExitValue(0);
}
 
Example 4
Source File: TestVerifySilently.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public static void main(String args[]) throws Exception {

    OutputAnalyzer output;

    output = runTest(false);
    output.shouldContain("[Verifying");
    output.shouldHaveExitValue(0);

    output = runTest(true);
    output.shouldNotContain("[Verifying");
    output.shouldHaveExitValue(0);
  }
 
Example 5
Source File: TestParallelScavengeSerialOld.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public static void main(String args[]) throws Exception {
  ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UseParallelGC", "-XX:-UseParallelOldGC", "-version");
  OutputAnalyzer output = new OutputAnalyzer(pb.start());
  output.shouldNotContain("deprecated");
  output.shouldNotContain("error");
  output.shouldHaveExitValue(0);
}
 
Example 6
Source File: TestSerialGC.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public static void main(String args[]) throws Exception {
  ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UseSerialGC", "-version");
  OutputAnalyzer output = new OutputAnalyzer(pb.start());
  output.shouldNotContain("deprecated");
  output.shouldNotContain("error");
  output.shouldHaveExitValue(0);
}
 
Example 7
Source File: TestIncGC.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public static void main(String args[]) throws Exception {
  ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-Xincgc", "-version");
  OutputAnalyzer output = new OutputAnalyzer(pb.start());
  output.shouldContain("warning: Using incremental CMS is deprecated and will likely be removed in a future release");
  output.shouldNotContain("error");
  output.shouldHaveExitValue(0);
}
 
Example 8
Source File: TestDefaultMaxRAMFraction.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public static void main(String[] args) throws Exception {
  ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:DefaultMaxRAMFraction=4", "-version");
  OutputAnalyzer output = new OutputAnalyzer(pb.start());
  output.shouldContain("warning: DefaultMaxRAMFraction is deprecated and will likely be removed in a future release. Use MaxRAMFraction instead.");
  output.shouldNotContain("error");
  output.shouldHaveExitValue(0);
}
 
Example 9
Source File: TestParallelGC.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public static void main(String args[]) throws Exception {
  ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UseParallelGC", "-version");
  OutputAnalyzer output = new OutputAnalyzer(pb.start());
  output.shouldNotContain("deprecated");
  output.shouldNotContain("error");
  output.shouldHaveExitValue(0);
}
 
Example 10
Source File: TestDefaultMaxRAMFraction.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public static void main(String[] args) throws Exception {
  ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:DefaultMaxRAMFraction=4", "-version");
  OutputAnalyzer output = new OutputAnalyzer(pb.start());
  output.shouldContain("warning: DefaultMaxRAMFraction is deprecated and will likely be removed in a future release. Use MaxRAMFraction instead.");
  output.shouldNotContain("error");
  output.shouldHaveExitValue(0);
}
 
Example 11
Source File: TestVerifySilently.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public static void main(String args[]) throws Exception {

    OutputAnalyzer output;

    output = runTest(false);
    output.shouldContain("[Verifying");
    output.shouldHaveExitValue(0);

    output = runTest(true);
    output.shouldNotContain("[Verifying");
    output.shouldHaveExitValue(0);
  }
 
Example 12
Source File: TestVerifySilently.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public static void main(String args[]) throws Exception {

    OutputAnalyzer output;

    output = runTest(false);
    output.shouldContain("[Verifying");
    output.shouldHaveExitValue(0);

    output = runTest(true);
    output.shouldNotContain("[Verifying");
    output.shouldHaveExitValue(0);
  }
 
Example 13
Source File: TestSerialGC.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public static void main(String args[]) throws Exception {
  ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UseSerialGC", "-version");
  OutputAnalyzer output = new OutputAnalyzer(pb.start());
  output.shouldNotContain("deprecated");
  output.shouldNotContain("error");
  output.shouldHaveExitValue(0);
}
 
Example 14
Source File: TestIncGC.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public static void main(String args[]) throws Exception {
  ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-Xincgc", "-version");
  OutputAnalyzer output = new OutputAnalyzer(pb.start());
  output.shouldContain("warning: Using incremental CMS is deprecated and will likely be removed in a future release");
  output.shouldNotContain("error");
  output.shouldHaveExitValue(0);
}
 
Example 15
Source File: TestDefNewCMS.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public static void main(String args[]) throws Exception {
  ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:-UseParNewGC", "-XX:+UseConcMarkSweepGC", "-version");
  OutputAnalyzer output = new OutputAnalyzer(pb.start());
  output.shouldContain("warning: Using the DefNew young collector with the CMS collector is deprecated and will likely be removed in a future release");
  output.shouldNotContain("error");
  output.shouldHaveExitValue(0);
}
 
Example 16
Source File: TestParallelGC.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public static void main(String args[]) throws Exception {
  ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UseParallelGC", "-version");
  OutputAnalyzer output = new OutputAnalyzer(pb.start());
  output.shouldNotContain("deprecated");
  output.shouldNotContain("error");
  output.shouldHaveExitValue(0);
}
 
Example 17
Source File: TestCMSNoIncrementalMode.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public static void main(String args[]) throws Exception {
  ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UseConcMarkSweepGC", "-XX:-CMSIncrementalMode", "-version");
  OutputAnalyzer output = new OutputAnalyzer(pb.start());
  output.shouldNotContain("deprecated");
  output.shouldNotContain("error");
  output.shouldHaveExitValue(0);
}
 
Example 18
Source File: TestCMS.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public static void main(String args[]) throws Exception {
  ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UseConcMarkSweepGC", "-version");
  OutputAnalyzer output = new OutputAnalyzer(pb.start());
  output.shouldNotContain("deprecated");
  output.shouldNotContain("error");
  output.shouldHaveExitValue(0);
}
 
Example 19
Source File: TestParallelScavengeSerialOld.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public static void main(String args[]) throws Exception {
  ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+UseParallelGC", "-XX:-UseParallelOldGC", "-version");
  OutputAnalyzer output = new OutputAnalyzer(pb.start());
  output.shouldNotContain("deprecated");
  output.shouldNotContain("error");
  output.shouldHaveExitValue(0);
}
 
Example 20
Source File: TestDefNewCMS.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public static void main(String args[]) throws Exception {
  ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:-UseParNewGC", "-XX:+UseConcMarkSweepGC", "-version");
  OutputAnalyzer output = new OutputAnalyzer(pb.start());
  output.shouldContain("warning: Using the DefNew young collector with the CMS collector is deprecated and will likely be removed in a future release");
  output.shouldNotContain("error");
  output.shouldHaveExitValue(0);
}