cshannon commented on code in PR #1628:
URL: https://github.com/apache/activemq/pull/1628#discussion_r2719150492


##########
activemq-unit-tests/src/test/java/org/apache/activemq/JMSConsumerTest.java:
##########
@@ -1066,4 +1070,13 @@ protected DestinationViewMBean 
createView(ActiveMQDestination destination) throw
         }
         return (DestinationViewMBean) 
broker.getManagementContext().newProxyInstance(name, 
DestinationViewMBean.class, true);
     }
+
+    private void assertNoAdditionalMessages(final AtomicInteger counter, final 
int expected) throws Exception {

Review Comment:
   Nit: I think it's a little bit nicer to just use a lambda instead of an 
anonymous method (this would apply the other uses of Wait as well). It's not 
strictly necessary of course but just a style thing. For example:
   
   ```java
   private void assertNoAdditionalMessages(final AtomicInteger counter, final 
int expected) throws Exception {
       assertFalse("unexpected additional messages received", Wait.waitFor(
           () -> counter.get() > expected, TimeUnit.SECONDS.toMillis(2), 50));
   }
   ```



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to