< prev index next >

test/sun/management/jmxremote/startstop/JMXStatusTest.java

Print this page
rev 16783 : 8176176: fix @modules in jdk_svc tests
Reviewed-by: duke


  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 import java.net.BindException;
  25 import java.util.ArrayList;
  26 import java.util.List;
  27 import java.util.function.Predicate;
  28 import java.util.regex.Pattern;
  29 import org.testng.annotations.*;
  30 import static org.testng.Assert.*;
  31 
  32 import jdk.testlibrary.ProcessTools;
  33 
  34 /**
  35  * @test
  36  * @bug 8023093 8138748 8142398
  37  * @summary Performs a sanity test for the ManagementAgent.status diagnostic command.
  38  *          Management agent may be disabled, started (only local connections) and started.
  39  *          The test asserts that the expected text is being printed.

  40  * @library /lib/testlibrary
  41  * @modules jdk.management.agent/jdk.internal.agent
  42  * @build jdk.testlibrary.* PortAllocator TestApp ManagementAgentJcmd
  43  *        JMXStatusTest JMXStatus1Test JMXStatus2Test
  44  * @run testng/othervm -XX:+UsePerfData JMXStatus1Test
  45  * @run testng/othervm -XX:+UsePerfData JMXStatus2Test
  46  */
  47 abstract public class JMXStatusTest {
  48     private final static String TEST_APP_NAME = "TestApp";
  49 
  50     protected final static Pattern DISABLED_AGENT_STATUS = Pattern.compile(
  51         "Agent\\s*\\: disabled$"
  52     );
  53 
  54     protected final static Pattern LOCAL_AGENT_STATUS = Pattern.compile(
  55         "Agent\\s*\\:\\s*enabled\\n+" +
  56         "Connection Type\\s*\\:\\s*local\\n+" +
  57         "Protocol\\s*\\:\\s*[a-z]+\\n+" +
  58         "Host\\s*\\:\\s*.+\\n+" +
  59         "URL\\s*\\:\\s*service\\:jmx\\:.+\\n+" +
  60         "Properties\\s*\\:\\n+(\\s*\\S+\\s*=\\s*\\S+(\\s+\\[default\\])?\\n*)+",
  61         Pattern.MULTILINE




  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 import java.net.BindException;
  25 import java.util.ArrayList;
  26 import java.util.List;
  27 import java.util.function.Predicate;
  28 import java.util.regex.Pattern;
  29 import org.testng.annotations.*;
  30 import static org.testng.Assert.*;
  31 
  32 import jdk.testlibrary.ProcessTools;
  33 
  34 /**
  35  * @test
  36  * @bug 8023093 8138748 8142398
  37  * @summary Performs a sanity test for the ManagementAgent.status diagnostic command.
  38  *          Management agent may be disabled, started (only local connections) and started.
  39  *          The test asserts that the expected text is being printed.
  40  *
  41  * @library /lib/testlibrary
  42  *
  43  * @build jdk.testlibrary.* PortAllocator TestApp ManagementAgentJcmd
  44  *        JMXStatusTest JMXStatus1Test JMXStatus2Test
  45  * @run testng/othervm -XX:+UsePerfData JMXStatus1Test
  46  * @run testng/othervm -XX:+UsePerfData JMXStatus2Test
  47  */
  48 abstract public class JMXStatusTest {
  49     private final static String TEST_APP_NAME = "TestApp";
  50 
  51     protected final static Pattern DISABLED_AGENT_STATUS = Pattern.compile(
  52         "Agent\\s*\\: disabled$"
  53     );
  54 
  55     protected final static Pattern LOCAL_AGENT_STATUS = Pattern.compile(
  56         "Agent\\s*\\:\\s*enabled\\n+" +
  57         "Connection Type\\s*\\:\\s*local\\n+" +
  58         "Protocol\\s*\\:\\s*[a-z]+\\n+" +
  59         "Host\\s*\\:\\s*.+\\n+" +
  60         "URL\\s*\\:\\s*service\\:jmx\\:.+\\n+" +
  61         "Properties\\s*\\:\\n+(\\s*\\S+\\s*=\\s*\\S+(\\s+\\[default\\])?\\n*)+",
  62         Pattern.MULTILINE


< prev index next >