[hornetq-commits] JBoss hornetq SVN: r11711 - trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/replication.

do-not-reply at jboss.org do-not-reply at jboss.org
Fri Nov 18 06:18:55 EST 2011


Author: borges
Date: 2011-11-18 06:18:54 -0500 (Fri, 18 Nov 2011)
New Revision: 11711

Modified:
   trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/replication/ReplicationTest.java
Log:
Improve tearDown: make sure everything gets closed.

Modified: trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/replication/ReplicationTest.java
===================================================================
--- trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/replication/ReplicationTest.java	2011-11-18 10:47:20 UTC (rev 11710)
+++ trunk/tests/integration-tests/src/test/java/org/hornetq/tests/integration/replication/ReplicationTest.java	2011-11-18 11:18:54 UTC (rev 11711)
@@ -311,10 +311,13 @@
       {
          TestInterceptor.value.set(false);
          if (!session.isClosed())
-            session.commit();
+            session.close();
          if (!session2.isClosed())
-            session2.commit();
+            session2.close();
+         if (sf != null)
+            sf.close();
       }
+
    }
 
    public void testExceptionSettingActionBefore() throws Exception
@@ -552,23 +555,21 @@
    @Override
    protected void tearDown() throws Exception
    {
-
       stopComponent(manager);
       manager = null;
+      stopComponent(backupServer);
+      backupServer = null;
       stopComponent(liveServer);
       liveServer = null;
-      stopComponent(backupServer);
-      backupServer = null;
+      closeServerLocator(locator);
 
-      executor.shutdown();
+      executor.shutdownNow();
+      scheduledExecutor.shutdownNow();
 
-      scheduledExecutor.shutdown();
-
       tFactory = null;
       scheduledExecutor = null;
 
       super.tearDown();
-
    }
 
    protected



More information about the hornetq-commits mailing list