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