< prev index next >

test/sun/tools/jmap/BasicJMapTest.java

Print this page




  25 import static jdk.testlibrary.Asserts.fail;
  26 
  27 import java.io.File;
  28 import java.util.Arrays;
  29 
  30 import jdk.test.lib.hprof.HprofParser;
  31 import jdk.testlibrary.JDKToolLauncher;
  32 import jdk.testlibrary.OutputAnalyzer;
  33 import jdk.testlibrary.ProcessTools;
  34 
  35 /*
  36  * @test
  37  * @bug 6321286
  38  * @summary Unit test for jmap utility
  39  * @key intermittent
  40  * @library /lib/testlibrary
  41  * @library /test/lib/share/classes
  42  * @modules java.management
  43  * @build jdk.testlibrary.*
  44  * @build jdk.test.lib.hprof.*
  45  * @build jdk.test.lib.hprof.module.*
  46  * @build jdk.test.lib.hprof.parser.*
  47  * @build jdk.test.lib.hprof.utils.*
  48  * @run main/timeout=240 BasicJMapTest
  49  */
  50 public class BasicJMapTest {
  51 
  52     private static ProcessBuilder processBuilder = new ProcessBuilder();
  53 
  54     public static void main(String[] args) throws Exception {
  55         testHisto();
  56         testHistoLive();
  57         testDump();
  58         testDumpLive();
  59     }
  60 
  61     private static void testHisto() throws Exception {
  62         OutputAnalyzer output = jmap("-histo");
  63         output.shouldHaveExitValue(0);
  64     }
  65 
  66     private static void testHistoLive() throws Exception {
  67         OutputAnalyzer output = jmap("-histo:live");




  25 import static jdk.testlibrary.Asserts.fail;
  26 
  27 import java.io.File;
  28 import java.util.Arrays;
  29 
  30 import jdk.test.lib.hprof.HprofParser;
  31 import jdk.testlibrary.JDKToolLauncher;
  32 import jdk.testlibrary.OutputAnalyzer;
  33 import jdk.testlibrary.ProcessTools;
  34 
  35 /*
  36  * @test
  37  * @bug 6321286
  38  * @summary Unit test for jmap utility
  39  * @key intermittent
  40  * @library /lib/testlibrary
  41  * @library /test/lib/share/classes
  42  * @modules java.management
  43  * @build jdk.testlibrary.*
  44  * @build jdk.test.lib.hprof.*
  45  * @build jdk.test.lib.hprof.model.*
  46  * @build jdk.test.lib.hprof.parser.*
  47  * @build jdk.test.lib.hprof.util.*
  48  * @run main/timeout=240 BasicJMapTest
  49  */
  50 public class BasicJMapTest {
  51 
  52     private static ProcessBuilder processBuilder = new ProcessBuilder();
  53 
  54     public static void main(String[] args) throws Exception {
  55         testHisto();
  56         testHistoLive();
  57         testDump();
  58         testDumpLive();
  59     }
  60 
  61     private static void testHisto() throws Exception {
  62         OutputAnalyzer output = jmap("-histo");
  63         output.shouldHaveExitValue(0);
  64     }
  65 
  66     private static void testHistoLive() throws Exception {
  67         OutputAnalyzer output = jmap("-histo:live");


< prev index next >