This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 202e73f79c47 CAMEL-25044: camel-jsonpath, camel-jq - the null body
hint tests expect NoSuchVariableException for a missing variable source
202e73f79c47 is described below
commit 202e73f79c47ee14354e07c3efffbcbc5a681273
Author: Claus Ibsen <[email protected]>
AuthorDate: Mon Sep 28 16:14:10 2026 +0200
CAMEL-25044: camel-jsonpath, camel-jq - the null body hint tests expect
NoSuchVariableException for a missing variable source
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Claus Ibsen <[email protected]>
---
.../test/java/org/apache/camel/language/jq/JqNullBodyHintTest.java | 5 +++--
.../java/org/apache/camel/jsonpath/JsonPathNullBodyHintTest.java | 5 +++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git
a/components/camel-jq/src/test/java/org/apache/camel/language/jq/JqNullBodyHintTest.java
b/components/camel-jq/src/test/java/org/apache/camel/language/jq/JqNullBodyHintTest.java
index cf410e11e9d6..a0cdf39b86e3 100644
---
a/components/camel-jq/src/test/java/org/apache/camel/language/jq/JqNullBodyHintTest.java
+++
b/components/camel-jq/src/test/java/org/apache/camel/language/jq/JqNullBodyHintTest.java
@@ -62,11 +62,12 @@ public class JqNullBodyHintTest extends JqTestSupport {
}
@Test
- public void testNullVariableSourceNamesTheSource() {
+ public void testMissingVariableSourceNamesTheVariable() {
String message =
rootCauseMessage(assertThrows(CamelExecutionException.class,
() -> template.sendBody("direct:variable", node("foo",
"bar"))));
- assertTrue(message.contains("got no input from variable(input) to
evaluate, it is null"),
+ // a missing variable as the source fails as a missing header does
(CAMEL-25044), naming the variable
+ assertTrue(message.contains("No 'input' variable available"),
"should name the variable source, not the body, but was: " +
message);
}
diff --git
a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathNullBodyHintTest.java
b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathNullBodyHintTest.java
index da5d42df3d98..5c8a6082f35b 100644
---
a/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathNullBodyHintTest.java
+++
b/components/camel-jsonpath/src/test/java/org/apache/camel/jsonpath/JsonPathNullBodyHintTest.java
@@ -60,11 +60,12 @@ public class JsonPathNullBodyHintTest extends
CamelTestSupport {
}
@Test
- public void testNullVariableSourceNamesTheSource() {
+ public void testMissingVariableSourceNamesTheVariable() {
String message =
rootCauseMessage(assertThrows(CamelExecutionException.class,
() -> template.sendBody("direct:variable", "{ \"foo\": \"bar\"
}")));
- assertTrue(message.contains("got no input from variable(input) to
evaluate (it is null)"),
+ // a missing variable as the source fails as a missing header does
(CAMEL-25044), naming the variable
+ assertTrue(message.contains("No 'input' variable available"),
"should name the variable source, not the body, but was: " +
message);
}