michaelandrepearce commented on a change in pull request #2794: ARTEMIS-2451 
limit size of destination cache
URL: https://github.com/apache/activemq-artemis/pull/2794#discussion_r313740128
 
 

 ##########
 File path: 
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/TemporaryDestinationTest.java
 ##########
 @@ -266,6 +266,24 @@ public void testForTempQueueTargetInfosSizeLimit() throws 
Exception {
       }
    }
 
+   @Test
+   public void testForKnownAddressSizeLimit() throws Exception {
+      try {
+         conn = createConnection();
+         Session s = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
+         for (int i = 0; i < 200; i++) {
+            TemporaryQueue temporaryQueue = s.createTemporaryQueue();
+            MessageProducer producer = s.createProducer(temporaryQueue);
+            producer.send(s.createMessage());
+         }
+         assertTrue(((ActiveMQConnection)conn).getKnownDestinations().size() 
<= 100);
 
 Review comment:
   similar could be done for  method
   
   void checkDestination(ActiveMQDestination destination) throws JMSException 
   
   just check if the connection was the one that created the destination 
object, and thus remove need for cache

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to