[jboss-cvs] JBoss Messaging SVN: r7784 - in trunk/tests/src/org/jboss/messaging/tests/integration: jms/bridge and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Aug 18 15:58:21 EDT 2009


Author: clebert.suconic at jboss.com
Date: 2009-08-18 15:58:21 -0400 (Tue, 18 Aug 2009)
New Revision: 7784

Modified:
   trunk/tests/src/org/jboss/messaging/tests/integration/client/SessionCloseOnGCTest.java
   trunk/tests/src/org/jboss/messaging/tests/integration/jms/bridge/BridgeTestBase.java
Log:
Fixing testsuite leaks on Bridge tests & one test tweak on SessionCloseOnGCTest

Modified: trunk/tests/src/org/jboss/messaging/tests/integration/client/SessionCloseOnGCTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/client/SessionCloseOnGCTest.java	2009-08-18 19:26:51 UTC (rev 7783)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/client/SessionCloseOnGCTest.java	2009-08-18 19:58:21 UTC (rev 7784)
@@ -236,8 +236,6 @@
          factory = null;
 
          checkWeakReferences(fref);
-
-         assertNull(fref.get());
       }
       finally
       {

Modified: trunk/tests/src/org/jboss/messaging/tests/integration/jms/bridge/BridgeTestBase.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/jms/bridge/BridgeTestBase.java	2009-08-18 19:26:51 UTC (rev 7783)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/jms/bridge/BridgeTestBase.java	2009-08-18 19:58:21 UTC (rev 7784)
@@ -75,19 +75,17 @@
 {
    private static final Logger log = Logger.getLogger(BridgeTestBase.class);
 
-   protected static ConnectionFactoryFactory cff0, cff1;
+   protected ConnectionFactoryFactory cff0, cff1;
 
-   protected static ConnectionFactory cf0, cf1;
+   protected ConnectionFactory cf0, cf1;
 
-   protected static DestinationFactory sourceQueueFactory, targetQueueFactory, localTargetQueueFactory,
+   protected DestinationFactory sourceQueueFactory, targetQueueFactory, localTargetQueueFactory,
             sourceTopicFactory;
 
-   protected static Queue sourceQueue, targetQueue, localTargetQueue;
+   protected Queue sourceQueue, targetQueue, localTargetQueue;
 
-   protected static Topic sourceTopic;
+   protected Topic sourceTopic;
 
-   protected static boolean firstTime = true;
-
    protected MessagingServer server0;
 
    protected JMSServerManager jmsServer0;
@@ -129,6 +127,7 @@
       server1 = Messaging.newMessagingServer(conf1, false);
 
       context1 = new InVMContext();
+      
       jmsServer1 = new JMSServerManagerImpl(server1);
       jmsServer1.setContext(context1);
       jmsServer1.start();
@@ -148,8 +147,6 @@
       // We must start this after the remote servers have been created or it won't
       // have deleted the database and the recovery manager may attempt to recover transactions
 
-      firstTime = false;
-
    }
 
    protected void createQueue(String queueName, int index) throws Exception
@@ -171,15 +168,38 @@
       // Check no subscriptions left lying around
 
       checkNoSubscriptions(sourceTopic, 0);
+      
+      
+      jmsServer0.stop();
+      
+      jmsServer1.stop();
 
       server1.stop();
+
       server0.stop();
-      
-      server1 = null;
+
+      cff0 = cff1 = null;
+
+      cf0 = cf1 = null;
+
+      sourceQueueFactory = targetQueueFactory = localTargetQueueFactory = sourceTopicFactory = null;
+
+      sourceQueue = targetQueue = localTargetQueue = null;
+
+      sourceTopic = null;
+
       server0 = null;
+
       jmsServer0 = null;
+
+      server1 = null;
+
       jmsServer1 = null;
-      context0 = context1 = null;
+
+      context0 = null;
+
+      context1 = null;
+
      
 
       super.tearDown();




More information about the jboss-cvs-commits mailing list