Skip to content

Commit 8ea0b88

Browse files
committed
[AMQ-9820]: closed connections leaking into the pool when reconnectOnException is used
1 parent 00a5352 commit 8ea0b88

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

activemq-jms-pool/src/test/java/org/apache/activemq/jms/pool/PooledConnectionSecurityExceptionTest.java

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,13 @@
1616
*/
1717
package org.apache.activemq.jms.pool;
1818

19-
import static org.junit.Assert.assertNotSame;
20-
import static org.junit.Assert.assertTrue;
21-
import static org.junit.Assert.fail;
22-
23-
import java.util.ArrayList;
24-
import java.util.List;
25-
2619
import jakarta.jms.Connection;
2720
import jakarta.jms.ExceptionListener;
2821
import jakarta.jms.JMSException;
2922
import jakarta.jms.JMSSecurityException;
3023
import jakarta.jms.MessageProducer;
3124
import jakarta.jms.Queue;
3225
import jakarta.jms.Session;
33-
3426
import org.apache.activemq.ActiveMQConnectionFactory;
3527
import org.apache.activemq.broker.BrokerPlugin;
3628
import org.apache.activemq.broker.BrokerService;
@@ -50,6 +42,13 @@
5042
import org.slf4j.Logger;
5143
import org.slf4j.LoggerFactory;
5244

45+
import java.util.ArrayList;
46+
import java.util.List;
47+
48+
import static org.junit.Assert.assertNotSame;
49+
import static org.junit.Assert.assertTrue;
50+
import static org.junit.Assert.fail;
51+
5352
/**
5453
* Test Pooled connections ability to handle security exceptions
5554
*/
@@ -112,7 +111,6 @@ public void onException(JMSException exception) {
112111
@Test
113112
public void testFailureGetsNewConnectionOnRetryLooped() throws Exception {
114113
for (int i = 0; i < 10; ++i) {
115-
LOG.info("Iteration: {}", i);
116114
testFailureGetsNewConnectionOnRetry();
117115
}
118116
}

0 commit comments

Comments
 (0)