< prev index next >
test/sun/tools/jps/JpsBase.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 57,67 ****
fullProcessName = JpsBase.class.getName();
}
}
public static void main(String[] args) throws Exception {
! int pid = ProcessTools.getProcessId();
List<List<JpsHelper.JpsArg>> combinations = JpsHelper.JpsArg.generateCombinations();
for (List<JpsHelper.JpsArg> combination : combinations) {
OutputAnalyzer output = JpsHelper.jps(JpsHelper.JpsArg.asCmdArray(combination));
output.shouldHaveExitValue(0);
--- 57,67 ----
fullProcessName = JpsBase.class.getName();
}
}
public static void main(String[] args) throws Exception {
! long pid = ProcessTools.getProcessId();
List<List<JpsHelper.JpsArg>> combinations = JpsHelper.JpsArg.generateCombinations();
for (List<JpsHelper.JpsArg> combination : combinations) {
OutputAnalyzer output = JpsHelper.jps(JpsHelper.JpsArg.asCmdArray(combination));
output.shouldHaveExitValue(0);
*** 74,84 ****
case q:
// If '-q' is specified output should contain only a list of local VM identifiers:
// 30673
isQuiet = true;
JpsHelper.verifyJpsOutput(output, "^\\d+$");
! output.shouldContain(Integer.toString(pid));
break;
case l:
// If '-l' is specified output should contain the full package name for the application's main class
// or the full path name to the application's JAR file:
// 30673 /tmp/jtreg/jtreg-workdir/scratch/JpsBase.jar ...
--- 74,84 ----
case q:
// If '-q' is specified output should contain only a list of local VM identifiers:
// 30673
isQuiet = true;
JpsHelper.verifyJpsOutput(output, "^\\d+$");
! output.shouldContain(Long.toString(pid));
break;
case l:
// If '-l' is specified output should contain the full package name for the application's main class
// or the full path name to the application's JAR file:
// 30673 /tmp/jtreg/jtreg-workdir/scratch/JpsBase.jar ...
< prev index next >