JvmstatCountersTest.java revision 29
29N/A * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. 29N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 29N/A * This code is free software; you can redistribute it and/or modify it 29N/A * under the terms of the GNU General Public License version 2 only, as 29N/A * published by the Free Software Foundation. 29N/A * This code is distributed in the hope that it will be useful, but WITHOUT 29N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 29N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 29N/A * version 2 for more details (a copy is included in the LICENSE file that 29N/A * accompanied this code). 29N/A * You should have received a copy of the GNU General Public License version 29N/A * 2 along with this work; if not, write to the Free Software Foundation, 29N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 29N/A * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 29N/A * CA 95054 USA or visit www.sun.com if you need additional information or 29N/A * have any questions. 29N/A * @summary Tests that the jvmstat counters published by the out-of-the-box 29N/A * management agent for the JMX connection details are correct. 29N/A * @author Luis-Miguel Alventosa 29N/A * @run clean JvmstatCountersTest 29N/A * @run build JvmstatCountersTest 29N/A * @run main/othervm -Dcom.sun.management.jmxremote.port=0 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false JvmstatCountersTest 3 29N/A "agent didn't publish any jvmstat counter.");
29N/A "agent unexpectedly published jvmstat counters.");
29N/A "agent didn't publish the local connector.");
29N/A "agent shouldn't publish the remote connector.");
29N/A "agent only publishes the local connector through " +
29N/A "a jvmstat counter.");
29N/A "agent didn't publish the local connector.");
29N/A "agent didnn't publish the remote connector.");
29N/A "agent shouldn't publish anything which isn't " +
29N/A "related to the remote connector.");
29N/A "agent publishes both the local and remote " +
29N/A "connector info through jvmstat counters.");
29N/A "agent unexpectedly published jvmstat counters.");
29N/A vm.
loadAgent(
agent,
"com.sun.management.jmxremote.port=0,com.sun.management.jmxremote.authenticate=false,com.sun.management.jmxremote.ssl=false");
29N/A "agent didn't publish the local connector.");
29N/A "agent didnn't publish the remote connector.");
29N/A "agent shouldn't publish anything which isn't " +
29N/A "related to the remote connector.");
29N/A "publishes both the local and remote connector " +
29N/A "info through jvmstat counters when the agent is " +
29N/A "loaded through the Attach API.");