This is an automated email from the ASF dual-hosted git repository.
fmariani 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 462fde278e66 Make assertion more reliable, ollama + some llms use
different characters for spaces
462fde278e66 is described below
commit 462fde278e662b13c310cdb4aace90c9c93f3c4b
Author: Croway <[email protected]>
AuthorDate: Tue Jan 13 14:46:50 2026 +0100
Make assertion more reliable, ollama + some llms use different characters
for spaces
---
.../langchain4j/tools/LangChain4jToolMultipleMatchingGroupsTest.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
a/components/camel-ai/camel-langchain4j-tools/src/test/java/org/apache/camel/component/langchain4j/tools/LangChain4jToolMultipleMatchingGroupsTest.java
b/components/camel-ai/camel-langchain4j-tools/src/test/java/org/apache/camel/component/langchain4j/tools/LangChain4jToolMultipleMatchingGroupsTest.java
index c1c8add368c1..2ba77524fecf 100644
---
a/components/camel-ai/camel-langchain4j-tools/src/test/java/org/apache/camel/component/langchain4j/tools/LangChain4jToolMultipleMatchingGroupsTest.java
+++
b/components/camel-ai/camel-langchain4j-tools/src/test/java/org/apache/camel/component/langchain4j/tools/LangChain4jToolMultipleMatchingGroupsTest.java
@@ -113,7 +113,9 @@ public class LangChain4jToolMultipleMatchingGroupsTest
extends CamelTestSupport
Assertions.assertThat(message).isNotNull();
final String responseContent =
message.getMessage().getBody().toString();
-
Assertions.assertThat(responseContent).containsIgnoringCase(nameFromDB);
+ // Normalize U+202F (narrow no-break space) to ASCII space - Granite4
may substitute spaces
+ final String normalizedContent = responseContent.replace('\u202F', '
');
+
Assertions.assertThat(normalizedContent).containsIgnoringCase(nameFromDB);
Assertions.assertThat(responseContent).containsIgnoringCase("engineering");
}
}