use of jdk.testlibrary.OutputAnalyzer in project jdk8u_jdk by JetBrains.
the class TestJcmdDefaults method testJcmdUsage.
/**
* jcmd -J-XX:+UsePerfData -h
* jcmd -J-XX:+UsePerfData -help
*/
private static void testJcmdUsage(String... jcmdArgs) throws Exception {
OutputAnalyzer output = JcmdBase.jcmdNoPid(VM_ARGS, jcmdArgs);
assertNotEquals(output.getExitValue(), 0);
verifyOutputAgainstFile(output);
}
use of jdk.testlibrary.OutputAnalyzer in project jdk8u_jdk by JetBrains.
the class TestJcmdSanity method testJcmdPidBigScript.
/**
* Tests that it possible send a file over 1024 bytes large via jcmd -f.
*
* jcmd -J-XX:+UsePerfData pid -f dcmd-big-script.txt
*/
private static void testJcmdPidBigScript() throws Exception {
File scrpitFile = new File(TEST_SRC, "dcmd-big-script.txt");
OutputAnalyzer output = JcmdBase.jcmd(VM_ARGS, new String[] { "-f", scrpitFile.getAbsolutePath() });
output.shouldHaveExitValue(0);
output.shouldNotContain("Exception");
output.shouldContain(System.getProperty("java.vm.name").trim());
}
use of jdk.testlibrary.OutputAnalyzer in project jdk8u_jdk by JetBrains.
the class TestJcmdSanity method testJcmdPidHelpHelp.
/**
* jcmd -J-XX:+UsePerfData pid help help
*/
private static void testJcmdPidHelpHelp() throws Exception {
OutputAnalyzer output = JcmdBase.jcmd(VM_ARGS, new String[] { "help", "help" });
output.shouldHaveExitValue(0);
verifyOutputAgainstFile(output);
}
use of jdk.testlibrary.OutputAnalyzer in project jdk8u_jdk by JetBrains.
the class TestJcmdSanity method testJcmdPid_f.
/**
* jcmd -J-XX:+UsePerfData pid -f dcmd-script.txt
*/
private static void testJcmdPid_f() throws Exception {
File scrpitFile = new File(TEST_SRC, "dcmd-script.txt");
OutputAnalyzer output = JcmdBase.jcmd(VM_ARGS, new String[] { "-f", scrpitFile.getAbsolutePath() });
output.shouldHaveExitValue(0);
verifyOutputAgainstFile(output);
}
use of jdk.testlibrary.OutputAnalyzer in project jdk8u_jdk by JetBrains.
the class JstatdTest method runToolsAndVerify.
private void runToolsAndVerify() throws Exception {
OutputAnalyzer output = runJps();
verifyJpsOutput(output);
output = runJstat();
verifyJstatOutput(output);
}
Aggregations