davsclaus commented on code in PR #27910:
URL: https://github.com/apache/camel/pull/27910#discussion_r4298280367
##########
components/camel-milo/src/test/java/org/apache/camel/component/milo/MonitorItemLifecycleTest.java:
##########
@@ -128,7 +142,14 @@ public void configure() {
from(resolve(MILO_CLIENT_UNKNOWN_ITEM)).routeId("unknownItem").to(MOCK_UNKNOWN_ITEM);
// the consumers deliver the current values while they start,
so the tests start these routes
-
from(resolve(MILO_CLIENT_ITEM_1)).routeId("item1").autoStartup(false).to(MOCK_ITEM_1);
+
from(resolve(MILO_CLIENT_ITEM_1)).routeId("item1").autoStartup(false)
+ .process(exchange -> {
+ final Object value =
exchange.getMessage().getBody(DataValue.class).getValue().getValue();
+ if (SLOW_VALUE.equals(value) &&
slowValueProcessed.compareAndSet(false, true)) {
+ Thread.sleep(3000);
Review Comment:
Nit: CLAUDE.md asks new test code not to add `Thread.sleep()`. Here the
sleep is the slow route under test rather than a wait for something, so keeping
it is fine with a short comment that says so. If avoiding the call is
preferred, the `delay` EIP with `syncDelayed()` inside a `filter` on the slow
value holds the delivery thread the same way.
--
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]