tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1406155 - in /openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb: config/MBeanDeployerTest.java monitoring/JMXContainerTest.java
Date Tue, 06 Nov 2012 14:49:45 GMT
Author: rmannibucau
Date: Tue Nov  6 14:49:44 2012
New Revision: 1406155

URL: http://svn.apache.org/viewvc?rev=1406155&view=rev
Log:
some more test fixes

Modified:
    openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb/config/MBeanDeployerTest.java
    openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb/monitoring/JMXContainerTest.java

Modified: openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb/config/MBeanDeployerTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb/config/MBeanDeployerTest.java?rev=1406155&r1=1406154&r2=1406155&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb/config/MBeanDeployerTest.java
(original)
+++ openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb/config/MBeanDeployerTest.java
Tue Nov  6 14:49:44 2012
@@ -57,6 +57,7 @@ public class MBeanDeployerTest {
 
     @Before
     public void startOpenEJB() throws Exception {
+        System.setProperty(LocalMBeanServer.OPENEJB_JMX_ACTIVE, "true");
         config = new ConfigurationFactory();
         assembler = new Assembler();
         assembler.createProxyFactory(config.configureService(ProxyFactoryInfo.class));
@@ -83,6 +84,7 @@ public class MBeanDeployerTest {
 
     @After
     public void resetList() {
+        System.clearProperty(LocalMBeanServer.OPENEJB_JMX_ACTIVE);
         assembler.destroy();
         SystemInstance.reset();
     }

Modified: openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb/monitoring/JMXContainerTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb/monitoring/JMXContainerTest.java?rev=1406155&r1=1406154&r2=1406155&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb/monitoring/JMXContainerTest.java
(original)
+++ openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb/monitoring/JMXContainerTest.java
Tue Nov  6 14:49:44 2012
@@ -23,6 +23,8 @@ import org.apache.openejb.core.singleton
 import org.apache.openejb.jee.SingletonBean;
 import org.apache.openejb.junit.ApplicationComposer;
 import org.apache.openejb.junit.Module;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -31,6 +33,16 @@ import static org.junit.Assert.assertTru
 
 @RunWith(ApplicationComposer.class)
 public class JMXContainerTest {
+    @BeforeClass
+    public static void init() {
+        System.setProperty(LocalMBeanServer.OPENEJB_JMX_ACTIVE, "true");
+    }
+
+    @AfterClass
+    public static void reset() {
+        System.clearProperty(LocalMBeanServer.OPENEJB_JMX_ACTIVE);
+    }
+
     @Test
     public void checkContainerIsRegistered() throws Exception {
         final ObjectName on = new ObjectName("openejb.management:ObjectType=containers,DataSource=Default
Singleton Container");



Mime
View raw message