Skip to content

Commit

Permalink
ARTEMIS-606 JMSServerControl2Test#testCloseConsumerConnectionsForAddr…
Browse files Browse the repository at this point in the history
…essForInVM 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.
  • Loading branch information
Erich Duda authored and clebertsuconic committed Jul 1, 2016
1 parent db251cc commit 45e4138
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 45e4138

Please sign in to comment.