do best effort to drain the queues.. and error should not interrupt the connection and broker shutdown.

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@643205 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2008-03-31 23:15:45 +00:00
parent c20b10bed8
commit 431478a8f5
1 changed files with 11 additions and 8 deletions

View File

@ -142,6 +142,7 @@ public class ActiveMQTestCase extends TestCase
*/ */
protected void tearDown() throws Exception { protected void tearDown() throws Exception {
TextMessage msg; TextMessage msg;
try {
for (final Iterator i = consumersToEmpty.iterator(); i.hasNext();) for (final Iterator i = consumersToEmpty.iterator(); i.hasNext();)
{ {
final MessageConsumer consumer = (MessageConsumer) i.next(); final MessageConsumer consumer = (MessageConsumer) i.next();
@ -150,6 +151,8 @@ public class ActiveMQTestCase extends TestCase
msg = (TextMessage) consumer.receive(RECEIVE_TIMEOUT); msg = (TextMessage) consumer.receive(RECEIVE_TIMEOUT);
while (msg != null); while (msg != null);
} }
} catch (Exception e) {
}
if (connection != null) { if (connection != null) {
connection.stop(); connection.stop();
} }