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,14 +142,17 @@ public class ActiveMQTestCase extends TestCase
|
||||||
*/
|
*/
|
||||||
protected void tearDown() throws Exception {
|
protected void tearDown() throws Exception {
|
||||||
TextMessage msg;
|
TextMessage msg;
|
||||||
for (final Iterator i = consumersToEmpty.iterator(); i.hasNext();)
|
try {
|
||||||
{
|
for (final Iterator i = consumersToEmpty.iterator(); i.hasNext();)
|
||||||
final MessageConsumer consumer = (MessageConsumer) i.next();
|
{
|
||||||
if (consumer != null)
|
final MessageConsumer consumer = (MessageConsumer) i.next();
|
||||||
do
|
if (consumer != null)
|
||||||
msg = (TextMessage) consumer.receive(RECEIVE_TIMEOUT);
|
do
|
||||||
while (msg != null);
|
msg = (TextMessage) consumer.receive(RECEIVE_TIMEOUT);
|
||||||
}
|
while (msg != null);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
}
|
||||||
if (connection != null) {
|
if (connection != null) {
|
||||||
connection.stop();
|
connection.stop();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue