From 45e4138fad2a3d3326576af92b99ced69a545e17 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 30db0a2df5..5950887bb7 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 class JMSServerControl2Test extends ManagementTestBase { Assert.assertEquals(0, queueControl.getConsumerCount()); Assert.assertEquals(1, queueControl2.getConsumerCount()); + connection.close(); connection2.close(); } finally { @@ -1148,6 +1149,7 @@ public class JMSServerControl2Test extends ManagementTestBase { Assert.assertEquals(0, queueControl.getConsumerCount()); Assert.assertEquals(1, queueControl2.getConsumerCount()); + connection.close(); connection2.close(); } finally {