mirror of https://github.com/apache/activemq.git
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:
parent
c20b10bed8
commit
431478a8f5
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue