[jboss-cvs] JBoss Messaging SVN: r7721 - trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Aug 13 00:39:20 EDT 2009


Author: clebert.suconic at jboss.com
Date: 2009-08-13 00:39:19 -0400 (Thu, 13 Aug 2009)
New Revision: 7721

Modified:
   trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/XALargeMessageMultiThreadFailoverTest.java
   trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/XAMultiThreadRandomFailoverTest.java
Log:
tweaks

Modified: trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/XALargeMessageMultiThreadFailoverTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/XALargeMessageMultiThreadFailoverTest.java	2009-08-12 23:29:05 UTC (rev 7720)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/XALargeMessageMultiThreadFailoverTest.java	2009-08-13 04:39:19 UTC (rev 7721)
@@ -51,7 +51,7 @@
    // Constants -----------------------------------------------------
 
    // Attributes ----------------------------------------------------
-   private final byte[] BODY = new byte[500];
+   private static final byte[] BODY = new byte[500];
 
    // Static --------------------------------------------------------
 
@@ -70,7 +70,7 @@
       return sf;
 
    }
-
+   
    @Override
    protected void start() throws Exception
    {

Modified: trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/XAMultiThreadRandomFailoverTest.java
===================================================================
--- trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/XAMultiThreadRandomFailoverTest.java	2009-08-12 23:29:05 UTC (rev 7720)
+++ trunk/tests/src/org/jboss/messaging/tests/integration/cluster/failover/XAMultiThreadRandomFailoverTest.java	2009-08-13 04:39:19 UTC (rev 7721)
@@ -71,6 +71,36 @@
 
    private final int NUM_SESSIONS = getNumSessions();
 
+   protected void tearDown() throws Exception
+   {
+      try
+      {
+         if (backupService != null && backupService.isStarted())
+         {
+            backupService.stop();
+         }
+      }
+      catch (Throwable ignored)
+      {
+      }
+
+      try
+      {
+         if (liveService != null && liveService.isStarted())
+         {
+            liveService.stop();
+         }
+      }
+      catch (Throwable ignored)
+      {
+      }
+
+      liveService = null;
+      backupService = null;
+
+      super.tearDown();
+   }
+
    protected int getNumSessions()
    {
       return 10;
@@ -631,9 +661,9 @@
       backupService.stop();
 
       liveService.stop();
-      
+
       backupService = null;
-      
+
       liveService = null;
 
       assertEquals(0, InVMRegistry.instance.size());
@@ -784,11 +814,11 @@
          try
          {
             stop();
-            
+
             // Suspend & resume... just exercising the API as part of the test
             session.end(xid, XAResource.TMSUSPEND);
             session.start(xid, XAResource.TMRESUME);
-            
+
             session.end(xid, XAResource.TMSUCCESS);
             session.prepare(xid);
             session.commit(xid, false);
@@ -825,7 +855,7 @@
             log.error(failure);
             return;
          }
-      
+
          try
          {
             message.acknowledge();




More information about the jboss-cvs-commits mailing list