activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r643205 - /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/amq1095/ActiveMQTestCase.java
Date Mon, 31 Mar 2008 23:15:51 GMT
Author: chirino
Date: Mon Mar 31 16:15:45 2008
New Revision: 643205

URL: http://svn.apache.org/viewvc?rev=643205&view=rev
Log:
do best effort to drain the queues.. and error should not interrupt the connection and broker
shutdown.

Modified:
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/amq1095/ActiveMQTestCase.java

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/amq1095/ActiveMQTestCase.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/amq1095/ActiveMQTestCase.java?rev=643205&r1=643204&r2=643205&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/amq1095/ActiveMQTestCase.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/amq1095/ActiveMQTestCase.java
Mon Mar 31 16:15:45 2008
@@ -142,14 +142,17 @@
      */
     protected void tearDown() throws Exception {
         TextMessage msg;
-        for (final Iterator i = consumersToEmpty.iterator(); i.hasNext();)
-        {
-            final MessageConsumer consumer = (MessageConsumer) i.next();
-            if (consumer != null)
-                do
-                    msg = (TextMessage) consumer.receive(RECEIVE_TIMEOUT);
-                while (msg != null);
-        }
+        try {
+			for (final Iterator i = consumersToEmpty.iterator(); i.hasNext();)
+			{
+			    final MessageConsumer consumer = (MessageConsumer) i.next();
+			    if (consumer != null)
+			        do
+			            msg = (TextMessage) consumer.receive(RECEIVE_TIMEOUT);
+			        while (msg != null);
+			}
+		} catch (Exception e) {
+		}
         if (connection != null) {
             connection.stop();
         }



Mime
View raw message