From 058a6ee880270834f9c886c1ec7eb72c2103cdca Mon Sep 17 00:00:00 2001 From: Erich Duda Date: Fri, 1 Jul 2016 14:54:18 +0200 Subject: [PATCH] ARTEMIS-606 JMSServerControl2Test#testCloseConsumerConnectionsForAddressForInVM fails Based on log it is clear that the connection was closed by Finalizer before the failure was caused by the test itself. Since the connection variable is not referenced in the code anymore, JVM concludes it can destroy the object. Especially IBM JDK does it very fast. --- .../jms/server/management/JMSServerControl2Test.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSServerControl2Test.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSServerControl2Test.java index 30db0a2df5e..5950887bb7a 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSServerControl2Test.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/management/JMSServerControl2Test.java @@ -986,6 +986,7 @@ public void onException(final JMSException e) { Assert.assertEquals(0, queueControl.getConsumerCount()); Assert.assertEquals(1, queueControl2.getConsumerCount()); + connection.close(); connection2.close(); } finally { @@ -1148,6 +1149,7 @@ public void onException(final JMSException e) { Assert.assertEquals(0, queueControl.getConsumerCount()); Assert.assertEquals(1, queueControl2.getConsumerCount()); + connection.close(); connection2.close(); } finally {