davsclaus commented on code in PR #13685: URL: https://github.com/apache/camel/pull/13685#discussion_r1549329149
########## components/camel-sjms2/src/test/java/org/apache/camel/component/sjms2/consumer/InOnlyTopicDurableConsumerTest.java: ########## @@ -49,9 +53,8 @@ public void testDurableTopic() throws Exception { mock2.expectedBodiesReceived("Hello World"); // wait a bit and send the message - Thread.sleep(1000); - - template.sendBody("sjms2:topic:foo", "Hello World"); + Awaitility.await().pollDelay(1, TimeUnit.SECONDS).untilAsserted(() -> Assertions Review Comment: This would not really work correct as you risk sending more than 1 message if this code is executed again by awaitability. So you cannot do this when you do `template.sendBody...` as that code is supposed to only be executed once. -- 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: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org