User: juhalindfors
Date: 02/01/23 13:39:35
Added: src/main/test/compliance/server MBeanServerTEST.java
Log:
MBeanServer tests go here
Revision Changes Path
1.1 jmx/src/main/test/compliance/server/MBeanServerTEST.java
Index: MBeanServerTEST.java
===================================================================
/*
* JBoss, the OpenSource J2EE webOS
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package test.compliance.server;
import junit.framework.TestCase;
import javax.management.*;
public class MBeanServerTEST extends TestCase
{
public MBeanServerTEST(String s)
{
super(s);
}
public void testInvokeNonExistantMBean()
{
try {
MBeanServer server = MBeanServerFactory.createMBeanServer();
server.invoke(new ObjectName(":mbean=doesnotexist"), "noMethod", null,
null);
// should not reach here
fail("InstanceNotFoundException was not thrown from an invoke operation on
a non-existant MBean.");
}
catch (InstanceNotFoundException e)
{
// should get here
}
catch (Throwable t)
{
t.printStackTrace();
fail("Unexpected error on server.invoke(NonExistantMBean): " +
t.toString());
}
}
}
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development