[jboss-cvs] JBoss Messaging SVN: r8137 - branches/JBM1831/tests/src/org/jboss/test/messaging/jms.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Nov 26 07:49:56 EST 2010


Author: gaohoward
Date: 2010-11-26 07:49:56 -0500 (Fri, 26 Nov 2010)
New Revision: 8137

Modified:
   branches/JBM1831/tests/src/org/jboss/test/messaging/jms/ConnectionConsumerTest.java
Log:
fix test problem


Modified: branches/JBM1831/tests/src/org/jboss/test/messaging/jms/ConnectionConsumerTest.java
===================================================================
--- branches/JBM1831/tests/src/org/jboss/test/messaging/jms/ConnectionConsumerTest.java	2010-11-26 06:22:17 UTC (rev 8136)
+++ branches/JBM1831/tests/src/org/jboss/test/messaging/jms/ConnectionConsumerTest.java	2010-11-26 12:49:56 UTC (rev 8137)
@@ -82,22 +82,28 @@
    {
       super.setUp();
    
-      InitialContext localIc = new InitialContext(InVMInitialContextFactory.getJNDIEnvironment());
+      if (!ServerManagement.isRemote())
+      {
+         InitialContext localIc = new InitialContext(InVMInitialContextFactory.getJNDIEnvironment());
            
-      tm = (TransactionManager)localIc.lookup(ServiceContainer.TRANSACTION_MANAGER_JNDI_NAME);
+         tm = (TransactionManager)localIc.lookup(ServiceContainer.TRANSACTION_MANAGER_JNDI_NAME);
       
-      suspended = tm.suspend();
+         suspended = tm.suspend();
       
-      log.debug("setup done");
+         log.debug("setup done");
+      }
    }
 
    protected void tearDown() throws Exception
    {
       super.tearDown();
       
-      if (suspended != null)
+      if (!ServerManagement.isRemote())
       {
-         tm.resume(suspended);
+         if (suspended != null)
+         {
+            tm.resume(suspended);
+         }
       }
    }
 



More information about the jboss-cvs-commits mailing list