davsclaus commented on code in PR #26103:
URL: https://github.com/apache/camel/pull/26103#discussion_r3940627102
##########
components/camel-jackson3/src/test/java/org/apache/camel/component/jackson3/JacksonFeaturesTest.java:
##########
@@ -49,6 +52,17 @@ public void testEnableMapperFeature() throws Exception {
mock.assertIsSatisfied();
}
+ @Test
+ public void testEnableDatatypeMapperFeature() throws Exception {
+ MockEndpoint mock = getMockEndpoint("mock:result");
+ mock.message(0).body().isEqualTo("123");
+
+ template.send("direct:unformat", exchange ->
exchange.getIn().setBody(new Date(123)));
+
+ mock.expectedMessageCount(1);
Review Comment:
`expectedMessageCount` should be set **before** `template.send()`, not
after. As written, the message can arrive and be recorded before the latch is
initialised, making the assertion non-deterministic.
```suggestion
mock.expectedMessageCount(1);
mock.message(0).body().isEqualTo("123");
template.send("direct:unformat", exchange ->
exchange.getIn().setBody(new Date(123)));
```
--
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]