[jboss-cvs] JBossAS SVN: r85297 - branches/Branch_5_x/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 09:53:43 EST 2009
Author: adrian at jboss.org
Date: 2009-03-05 09:53:43 -0500 (Thu, 05 Mar 2009)
New Revision: 85297
Modified:
branches/Branch_5_x/system-jmx/src/tests/org/jboss/test/system/controller/integration/test/AbstractJMXAnnotationTest.java
branches/Branch_5_x/system-jmx/src/tests/org/jboss/test/system/controller/integration/test/IntegrationTestSuite.java
Log:
Fix the leakage across tests
Modified: branches/Branch_5_x/system-jmx/src/tests/org/jboss/test/system/controller/integration/test/AbstractJMXAnnotationTest.java
===================================================================
--- branches/Branch_5_x/system-jmx/src/tests/org/jboss/test/system/controller/integration/test/AbstractJMXAnnotationTest.java 2009-03-05 14:47:26 UTC (rev 85296)
+++ branches/Branch_5_x/system-jmx/src/tests/org/jboss/test/system/controller/integration/test/AbstractJMXAnnotationTest.java 2009-03-05 14:53:43 UTC (rev 85297)
@@ -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: branches/Branch_5_x/system-jmx/src/tests/org/jboss/test/system/controller/integration/test/IntegrationTestSuite.java
===================================================================
--- branches/Branch_5_x/system-jmx/src/tests/org/jboss/test/system/controller/integration/test/IntegrationTestSuite.java 2009-03-05 14:47:26 UTC (rev 85296)
+++ branches/Branch_5_x/system-jmx/src/tests/org/jboss/test/system/controller/integration/test/IntegrationTestSuite.java 2009-03-05 14:53:43 UTC (rev 85297)
@@ -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