[jboss-cvs] JBoss Messaging SVN: r3111 - trunk/tests/src/org/jboss/test/messaging/jms.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Sep 17 15:47:19 EDT 2007


Author: clebert.suconic at jboss.com
Date: 2007-09-17 15:47:18 -0400 (Mon, 17 Sep 2007)
New Revision: 3111

Modified:
   trunk/tests/src/org/jboss/test/messaging/jms/ClientExitTest.java
Log:
minor fix - if connection was not created, we don't close the connection, so the real failure is not masked by another failure on the finally block, which has happened once on my tests

Modified: trunk/tests/src/org/jboss/test/messaging/jms/ClientExitTest.java
===================================================================
--- trunk/tests/src/org/jboss/test/messaging/jms/ClientExitTest.java	2007-09-17 17:32:42 UTC (rev 3110)
+++ trunk/tests/src/org/jboss/test/messaging/jms/ClientExitTest.java	2007-09-17 19:47:18 UTC (rev 3111)
@@ -120,17 +120,25 @@
       }
       finally
       {
-      	conn.close();
-      	
-         // TODO delete the file
-         if (serialized != null)
+         try
          {
-            serialized.delete();
+            if (conn != null)
+               conn.close();
+
+            // TODO delete the file
+            if (serialized != null)
+            {
+               serialized.delete();
+            }
+
+            localServer.undeployDestination(true, "Queue");
+            localServer.stopServerPeer();
+            localServer.stop();
          }
-
-         localServer.undeployDestination(true, "Queue");
-         localServer.stopServerPeer();
-         localServer.stop();
+         catch (Throwable ignored)
+         {
+            log.warn("Exception ignored:" + ignored.toString(), ignored);
+         }
       }
    }
 




More information about the jboss-cvs-commits mailing list