提交 0fc434b9 编写于 作者: R rriggs

8028141:...

8028141: test/sun/management/jmxremote/bootstrap/LocalManagementTest|CustomLauncherTest.java failing again
Summary: Correct to use the test.class.path instead of test.classes
Reviewed-by: alanb, chegar
上级 67ceb3ea
......@@ -39,12 +39,13 @@ import jdk.testlibrary.ProcessTools;
* @test
* @bug 6434402 8004926
* @library /lib/testlibrary
* @build jdk.testlibrary.ProcessTools
* @build TestManager TestApplication CustomLauncherTest
* @run main/othervm CustomLauncherTest
* @author Jaroslav Bachorik
*/
public class CustomLauncherTest {
private static final String TEST_CLASSES = System.getProperty("test.classes");
private static final String TEST_CLASSPATH = System.getProperty("test.class.path");
private static final String TEST_JDK = System.getProperty("test.jdk");
private static final String TEST_SRC = System.getProperty("test.src");
......@@ -82,7 +83,7 @@ public class CustomLauncherTest {
}
public static void main(String[] args) throws Exception {
if (TEST_CLASSES == null || TEST_CLASSES.isEmpty()) {
if (TEST_CLASSPATH == null || TEST_CLASSPATH.isEmpty()) {
System.out.println("Test is designed to be run from jtreg only");
return;
}
......@@ -139,8 +140,8 @@ public class CustomLauncherTest {
System.out.println("=========================");
System.out.println(" launcher : " + LAUNCHER);
System.out.println(" libjvm : " + libjvmPath.toString());
System.out.println(" classpath : " + TEST_CLASSES);
ProcessBuilder server = new ProcessBuilder(LAUNCHER, libjvmPath.toString(), TEST_CLASSES, "TestApplication");
System.out.println(" classpath : " + TEST_CLASSPATH);
ProcessBuilder server = new ProcessBuilder(LAUNCHER, libjvmPath.toString(), TEST_CLASSPATH, "TestApplication");
final AtomicReference<String> port = new AtomicReference<>();
final AtomicReference<String> pid = new AtomicReference<>();
......@@ -169,7 +170,7 @@ public class CustomLauncherTest {
ProcessBuilder client = ProcessTools.createJavaProcessBuilder(
"-cp",
TEST_CLASSES +
TEST_CLASSPATH +
File.pathSeparator +
TEST_JDK +
File.separator +
......
......@@ -41,6 +41,7 @@ import java.util.concurrent.atomic.AtomicReference;
* without connection or username/password details.
* TestManager will attempt a connection to the address obtained from
* both agent properties and jvmstat buffer.
* @build jdk.testlibrary.ProcessTools
* @build TestManager TestApplication
* @run main/othervm/timeout=300 LocalManagementTest
*/
......@@ -48,7 +49,7 @@ import java.util.concurrent.atomic.AtomicReference;
import jdk.testlibrary.ProcessTools;
public class LocalManagementTest {
private static final String TEST_CLASSES = System.getProperty("test.classes");
private static final String TEST_CLASSPATH = System.getProperty("test.class.path");
private static final String TEST_JDK = System.getProperty("test.jdk");
public static void main(String[] args) throws Exception {
......@@ -109,7 +110,7 @@ public class LocalManagementTest {
"com.sun.management.jmxremote.authenticate=false," +
"com.sun.management.jmxremote.ssl=false",
"-cp",
TEST_CLASSES,
TEST_CLASSPATH,
"TestApplication",
"-exit"
);
......@@ -163,7 +164,7 @@ public class LocalManagementTest {
private static boolean doTest(String testId, String arg) throws Exception {
List<String> args = new ArrayList<>();
args.add("-cp");
args.add(TEST_CLASSES);
args.add(TEST_CLASSPATH);
if (arg != null) {
args.add(arg);
......@@ -202,7 +203,7 @@ public class LocalManagementTest {
ProcessBuilder client = ProcessTools.createJavaProcessBuilder(
"-cp",
TEST_CLASSES +
TEST_CLASSPATH +
File.pathSeparator +
TEST_JDK +
File.separator +
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册