< prev index next >
test/jdk/sun/tools/jcmd/TestJcmdSanity.java
Print this page
rev 51638 : [mq]: 8210112
rev 51639 : [mq]: 8210112-1
*** 133,148 ****
* VM.system_properties
*
* @param output The generated output from the jcmd.
* @throws Exception
*/
! private static void matchJcmdCommands(OutputAnalyzer output) throws Exception {
! int matchedCount = output.shouldMatchByLine(JCMD_COMMAND_REGEX,
"help",
JCMD_COMMAND_REGEX);
- assertGreaterThan(matchedCount , 0,
- "Found no lines matching pattern: " + JCMD_COMMAND_REGEX);
}
/**
* Verifies the generated output from the PerfCounter.print command
* matches a certain pattern.
--- 133,146 ----
* VM.system_properties
*
* @param output The generated output from the jcmd.
* @throws Exception
*/
! private static void matchJcmdCommands(OutputAnalyzer output) {
! output.shouldMatchByLine(JCMD_COMMAND_REGEX,
"help",
JCMD_COMMAND_REGEX);
}
/**
* Verifies the generated output from the PerfCounter.print command
* matches a certain pattern.
*** 153,167 ****
* sun.rt.javaCommand="com.sun.javatest.regtest.MainWrapper /tmp/jtreg/jtreg-workdir/classes/sun/tools/jcmd/TestJcmdSanity.jta"
*
* @param output The generated output from the PerfCounter.print command.
* @throws Exception
*/
! private static void matchPerfCounters(OutputAnalyzer output) throws Exception {
! int matchedCount = output.shouldMatchByLineFrom(PERF_COUNTER_REGEX,
PERF_COUNTER_REGEX);
- assertGreaterThan(matchedCount , 0,
- "Found no lines matching pattern: " + PERF_COUNTER_REGEX);
}
private static void verifyOutputAgainstFile(OutputAnalyzer output) throws IOException {
Path path = Paths.get(TEST_SRC, "help_help.out");
List<String> fileOutput = Files.readAllLines(path);
--- 151,163 ----
* sun.rt.javaCommand="com.sun.javatest.regtest.MainWrapper /tmp/jtreg/jtreg-workdir/classes/sun/tools/jcmd/TestJcmdSanity.jta"
*
* @param output The generated output from the PerfCounter.print command.
* @throws Exception
*/
! private static void matchPerfCounters(OutputAnalyzer output) {
! output.shouldMatchByLineFrom(PERF_COUNTER_REGEX,
PERF_COUNTER_REGEX);
}
private static void verifyOutputAgainstFile(OutputAnalyzer output) throws IOException {
Path path = Paths.get(TEST_SRC, "help_help.out");
List<String> fileOutput = Files.readAllLines(path);
< prev index next >