test/com/sun/tools/attach/BasicTests.java

Print this page
rev 9907 : 8034960: Serviceability tests using @library failing with java.lang.NoClassDefFoundError


  21  * questions.
  22  */
  23 
  24 import com.sun.tools.attach.*;
  25 import java.net.ServerSocket;
  26 import java.net.Socket;
  27 import java.io.IOException;
  28 import java.util.Properties;
  29 import java.util.List;
  30 import java.io.File;
  31 import jdk.testlibrary.OutputAnalyzer;
  32 import jdk.testlibrary.JDKToolLauncher;
  33 import jdk.testlibrary.ProcessTools;
  34 import jdk.testlibrary.ProcessThread;
  35 
  36 /*
  37  * @test
  38  * @bug 6173612 6273707 6277253 6335921 6348630 6342019 6381757
  39  * @summary Basic unit tests for the VM attach mechanism.
  40  * @library /lib/testlibrary
  41  * @run build Agent BadAgent RedefineAgent Application Shutdown RedefineDummy RunnerUtil
  42  * @run main BasicTests
  43  *
  44  * This test will perform a number of basic attach tests.
  45  */
  46 public class BasicTests {
  47 
  48     /*
  49      * The actual test is in the nested class TestMain.
  50      * The responsibility of this class is to:
  51      * 1. Build all needed jars.
  52      * 2. Start the Application class in a separate process.
  53      * 3. Find the pid and shutdown port of the running Application.
  54      * 4. Launches the tests in nested class TestMain that will attach to the Application.
  55      * 5. Shut down the Application.
  56      */
  57     public static void main(String args[]) throws Throwable {
  58         final String pidFile = "TestsBasic.Application.pid";
  59         ProcessThread processThread = null;
  60         RunnerUtil.ProcessInfo info = null;
  61         try {




  21  * questions.
  22  */
  23 
  24 import com.sun.tools.attach.*;
  25 import java.net.ServerSocket;
  26 import java.net.Socket;
  27 import java.io.IOException;
  28 import java.util.Properties;
  29 import java.util.List;
  30 import java.io.File;
  31 import jdk.testlibrary.OutputAnalyzer;
  32 import jdk.testlibrary.JDKToolLauncher;
  33 import jdk.testlibrary.ProcessTools;
  34 import jdk.testlibrary.ProcessThread;
  35 
  36 /*
  37  * @test
  38  * @bug 6173612 6273707 6277253 6335921 6348630 6342019 6381757
  39  * @summary Basic unit tests for the VM attach mechanism.
  40  * @library /lib/testlibrary
  41  * @run build jdk.testlibrary.* Agent BadAgent RedefineAgent Application Shutdown RedefineDummy RunnerUtil
  42  * @run main BasicTests
  43  *
  44  * This test will perform a number of basic attach tests.
  45  */
  46 public class BasicTests {
  47 
  48     /*
  49      * The actual test is in the nested class TestMain.
  50      * The responsibility of this class is to:
  51      * 1. Build all needed jars.
  52      * 2. Start the Application class in a separate process.
  53      * 3. Find the pid and shutdown port of the running Application.
  54      * 4. Launches the tests in nested class TestMain that will attach to the Application.
  55      * 5. Shut down the Application.
  56      */
  57     public static void main(String args[]) throws Throwable {
  58         final String pidFile = "TestsBasic.Application.pid";
  59         ProcessThread processThread = null;
  60         RunnerUtil.ProcessInfo info = null;
  61         try {