gnodet-bot commented on code in PR #26780:
URL: https://github.com/apache/camel/pull/26780#discussion_r4084429662
##########
components/camel-jq/src/test/java/org/apache/camel/language/jq/JqNullBodyHintTest.java:
##########
@@ -52,8 +52,10 @@ public void testNullBodySaysTheBodyIsNullAndHowToLoadOne() {
"should keep the original message, but was: " + message);
assertTrue(message.contains("the jq expression got no message body to
evaluate, the body is null"),
"should say the body is null, but was: " + message);
- assertTrue(message.contains("set it with setBody"),
- "should say how to load a body, but was: " + message);
+ assertTrue(message.contains("constant: resource:file:"),
+ "should show the form for a known file, but was: " + message);
+ assertTrue(message.contains("poll:"),
+ "should offer poll for a file that is not known in advance,
but was: " + message);
Review Comment:
⚠️ **Test parity gap vs `JsonPathNullBodyHintTest`.**
The new jq error message includes `"has the body of its caller"` (same
wording as jsonpath), but `JqNullBodyHintTest` does not assert it.
`JsonPathNullBodyHintTest` gains a third assertion on that phrase —
`JqNullBodyHintTest` should too:
```java
assertTrue(message.contains("has the body of its caller"),
"should say why the body is null in a direct: route, but
was: " + message);
```
--
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]