From 89e8767973e84828d1c5513884b0b8eeaa895aa4 Mon Sep 17 00:00:00 2001 From: gtully Date: Fri, 2 May 2014 18:17:04 +0100 Subject: [PATCH] fix shutdown order on close - broker may be gone before client --- .../org/apache/activemq/broker/policy/SecureDLQTest.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/broker/policy/SecureDLQTest.java b/activemq-unit-tests/src/test/java/org/apache/activemq/broker/policy/SecureDLQTest.java index 9d656e891c..354031ed9c 100644 --- a/activemq-unit-tests/src/test/java/org/apache/activemq/broker/policy/SecureDLQTest.java +++ b/activemq-unit-tests/src/test/java/org/apache/activemq/broker/policy/SecureDLQTest.java @@ -95,13 +95,10 @@ public class SecureDLQTest extends DeadLetterTestSupport { @Override public void tearDown() throws Exception { + if (dlqConnection != null) { + dlqConnection.close(); + } super.tearDown(); - if (dlqSession != null) { - dlqSession.close(); - } - if (dlqConsumer != null) { - dlqConsumer.close(); - } } @Override