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_r313731309
##########
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:
Need a test case where a temporary dest is created first and then later
consumers are created on it, currently with this change the existing behaviour
which allows this and will mean on create consumer for the temp dest will
throw error as will be not a known dest.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services