davsclaus commented on code in PR #24496:
URL: https://github.com/apache/camel/pull/24496#discussion_r3536837161


##########
AGENTS.md:
##########
@@ -163,10 +163,37 @@ await().atMost(20, TimeUnit.SECONDS)
        .untilAsserted(() -> assertEquals(1, context.getRoutes().size()));
 ```
 
+**MockEndpoint tests — prefer built-in timed assertions:**
+
+When the wait condition is "mock expectations are met", use `MockEndpoint`'s 
native timed
+assertion instead of wrapping with Awaitility. It is latch-based (more 
efficient than polling)
+and requires no external dependency:
+
+```java
+// Preferred — native, latch-based, returns as soon as expectations are met:
+MockEndpoint.assertIsSatisfied(context, 10, TimeUnit.SECONDS);

Review Comment:
   The default timeout is 10 seconds, so `MockEndpoint.assertIsSatisfied()` can 
be used when you dont need a longer timeout



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

Reply via email to