[jboss-cvs] JBossAS SVN: r85291 - trunk/system-jmx/src/tests/org/jboss/test/system/controller/integration/test.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Mar 5 07:23:04 EST 2009
Author: adrian at jboss.org
Date: 2009-03-05 07:23:04 -0500 (Thu, 05 Mar 2009)
New Revision: 85291
Modified:
trunk/system-jmx/src/tests/org/jboss/test/system/controller/integration/test/AbstractJMXAnnotationTest.java
trunk/system-jmx/src/tests/org/jboss/test/system/controller/integration/test/IntegrationTestSuite.java
Log:
Fix the leakage across tests
Modified: trunk/system-jmx/src/tests/org/jboss/test/system/controller/integration/test/AbstractJMXAnnotationTest.java
===================================================================
--- trunk/system-jmx/src/tests/org/jboss/test/system/controller/integration/test/AbstractJMXAnnotationTest.java 2009-03-05 12:02:54 UTC (rev 85290)
+++ trunk/system-jmx/src/tests/org/jboss/test/system/controller/integration/test/AbstractJMXAnnotationTest.java 2009-03-05 12:23:04 UTC (rev 85291)
@@ -25,6 +25,7 @@
import javax.management.MBeanServer;
import javax.management.MBeanServerFactory;
+import org.jboss.mx.util.MBeanServerLocator;
import org.jboss.test.AbstractTestDelegate;
/**
@@ -42,7 +43,7 @@
protected URL getBeansURL() throws Exception
{
- Class clazz = getClass();
+ Class<?> clazz = getClass();
String testName = clazz.getName();
testName = testName.replace('.', '/') + "-beans.xml";
return clazz.getClassLoader().getResource(testName);
@@ -61,14 +62,14 @@
}
}
- public static AbstractTestDelegate getDelegate(Class clazz) throws Exception
+ public static AbstractTestDelegate getDelegate(Class<?> clazz) throws Exception
{
return new JMXAwareTestDelegate(clazz);
}
private static class JMXAwareTestDelegate extends IntegrationTestDelegate
{
- public JMXAwareTestDelegate(Class clazz)
+ public JMXAwareTestDelegate(Class<?> clazz)
{
super(clazz);
}
@@ -77,5 +78,11 @@
{
return MBeanServerFactory.createMBeanServer("jboss");
}
+
+ public void tearDown() throws Exception
+ {
+ MBeanServerLocator.setJBoss(null);
+ MBeanServerFactory.releaseMBeanServer(getServer());
+ }
}
}
\ No newline at end of file
Modified: trunk/system-jmx/src/tests/org/jboss/test/system/controller/integration/test/IntegrationTestSuite.java
===================================================================
--- trunk/system-jmx/src/tests/org/jboss/test/system/controller/integration/test/IntegrationTestSuite.java 2009-03-05 12:02:54 UTC (rev 85290)
+++ trunk/system-jmx/src/tests/org/jboss/test/system/controller/integration/test/IntegrationTestSuite.java 2009-03-05 12:23:04 UTC (rev 85291)
@@ -53,6 +53,7 @@
suite.addTest(MCDependsJMXUnitTestCase.suite());
suite.addTest(JMXDependsMCUnitTestCase.suite());
suite.addTest(JMXAnnotationTestCase.suite());
+ suite.addTest(JMXAnnotationPluginTestCase.suite());
return suite;
}
More information about the jboss-cvs-commits
mailing list