diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/AutoCreateJmsQueueTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/AutoCreateJmsQueueTest.java index 91878c86be..54f18dc12b 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/AutoCreateJmsQueueTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/AutoCreateJmsQueueTest.java @@ -65,10 +65,10 @@ public class AutoCreateJmsQueueTest extends JMSTestBase { Assert.assertNotNull(m); } - connection.close(); - // make sure the JMX control was created for the JMS queue assertNotNull(server.getManagementService().getResource("jms.queue.test")); + + connection.close(); } @Test diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/AutoDeleteJmsQueueTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/AutoDeleteJmsQueueTest.java index b120b29363..81cd6ec3e4 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/AutoDeleteJmsQueueTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/AutoDeleteJmsQueueTest.java @@ -75,6 +75,9 @@ public class AutoDeleteJmsQueueTest extends JMSTestBase { // ensure the queue was removed Assert.assertNull(server.getPostOffice().getBinding(new SimpleString("jms.queue.test"))); + + // make sure the JMX control was removed for the JMS queue + assertNull(server.getManagementService().getResource("jms.queue.test")); } @Test