< prev index next >

test/jdk/sun/management/jmxremote/startstop/JMXStatusPerfCountersTest.java

Print this page
rev 51638 : [mq]: 8210112


  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 import java.io.IOException;
  25 import java.net.BindException;
  26 import java.util.Properties;
  27 import java.util.function.Predicate;
  28 import static org.testng.Assert.*;
  29 import org.testng.annotations.AfterMethod;
  30 import org.testng.annotations.BeforeClass;
  31 import org.testng.annotations.BeforeMethod;
  32 import org.testng.annotations.BeforeTest;
  33 import org.testng.annotations.Test;
  34 
  35 import jdk.testlibrary.ProcessTools;
  36 
  37 
  38 /**
  39  * @test
  40  * @bug 8075926
  41  * @key intermittent
  42  * @summary Makes sure that the current management agent status is reflected
  43  *          in the related performance counters.
  44  *
  45  * @library /lib/testlibrary

  46  *
  47  * @build jdk.testlibrary.* PortAllocator TestApp ManagementAgentJcmd
  48  * @run testng/othervm -XX:+UsePerfData JMXStatusPerfCountersTest
  49  */
  50 public class JMXStatusPerfCountersTest {
  51     private final static String TEST_APP_NAME = "TestApp";
  52 
  53     private final static String REMOTE_STATUS_KEY = "sun.management.JMXConnectorServer.remote.enabled";
  54 
  55     private static ProcessBuilder testAppPb;
  56     private Process testApp;
  57 
  58     private ManagementAgentJcmd jcmd;
  59 
  60     @BeforeClass
  61     public static void setupClass() throws Exception {
  62         testAppPb = ProcessTools.createJavaProcessBuilder(
  63             "-XX:+UsePerfData",
  64             "-cp", System.getProperty("test.class.path"),
  65             TEST_APP_NAME




  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 import java.io.IOException;
  25 import java.net.BindException;
  26 import java.util.Properties;
  27 import java.util.function.Predicate;
  28 import static org.testng.Assert.*;
  29 import org.testng.annotations.AfterMethod;
  30 import org.testng.annotations.BeforeClass;
  31 import org.testng.annotations.BeforeMethod;
  32 import org.testng.annotations.BeforeTest;
  33 import org.testng.annotations.Test;
  34 
  35 import jdk.test.lib.process.ProcessTools;
  36 
  37 
  38 /**
  39  * @test
  40  * @bug 8075926
  41  * @key intermittent
  42  * @summary Makes sure that the current management agent status is reflected
  43  *          in the related performance counters.
  44  *
  45  * @library /lib/testlibrary
  46  * @library /test/lib
  47  *
  48  * @build jdk.testlibrary.* PortAllocator TestApp ManagementAgentJcmd
  49  * @run testng/othervm -XX:+UsePerfData JMXStatusPerfCountersTest
  50  */
  51 public class JMXStatusPerfCountersTest {
  52     private final static String TEST_APP_NAME = "TestApp";
  53 
  54     private final static String REMOTE_STATUS_KEY = "sun.management.JMXConnectorServer.remote.enabled";
  55 
  56     private static ProcessBuilder testAppPb;
  57     private Process testApp;
  58 
  59     private ManagementAgentJcmd jcmd;
  60 
  61     @BeforeClass
  62     public static void setupClass() throws Exception {
  63         testAppPb = ProcessTools.createJavaProcessBuilder(
  64             "-XX:+UsePerfData",
  65             "-cp", System.getProperty("test.class.path"),
  66             TEST_APP_NAME


< prev index next >