cshannon commented on a change in pull request #2872: ARTEMIS-2531: Fix filter 
in FederatedQueue to prevent infinite consumer creation in a circular or 
bidrectional setup
URL: https://github.com/apache/activemq-artemis/pull/2872#discussion_r339182642
 
 

 ##########
 File path: 
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/federation/FederatedQueueTest.java
 ##########
 @@ -177,6 +177,11 @@ public void testFederatedQueueBiDirectional() throws 
Exception {
          producer1.send(session1.createTextMessage("hello"));
          assertNotNull(consumer0.receive(1000));
 
+         //Sleep to see if extra consumers are created - this tests to make 
sure there is no loop and tests the FederatedQueue metaDataFilterString
+         //is working properly - should only be 1 consumer on each (1 for the 
local consumer on broker0 and 1 for the federated consumer on broker1)
+         Thread.sleep(1000);
+         assertEquals(1, ((QueueBinding) 
getServer(0).getPostOffice().getBinding(SimpleString.toSimpleString(queueName))).consumerCount());
+         assertEquals(1, ((QueueBinding) 
getServer(1).getPostOffice().getBinding(SimpleString.toSimpleString(queueName))).consumerCount());
 
 Review comment:
   Yeah that's fine, i can go ahead and change that.

----------------------------------------------------------------
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

Reply via email to