gnodet commented on code in PR #24858:
URL: https://github.com/apache/camel/pull/24858#discussion_r3638835691


##########
components/camel-ai/camel-langchain4j-embeddingstore/src/test/java/org/apache/camel/component/langchain4j/embeddings/LangChain4jEmbeddingStoreComponentTest.java:
##########
@@ -51,16 +53,16 @@ protected CamelContext createCamelContext() throws 
Exception {
     }
 
     @Test
-    public void testSimpleEmbedding() {
-
+    public void testSimpleEmbedding() throws Exception {
         EmbeddingModel embeddingModel = new AllMiniLmL6V2EmbeddingModel();
 
         TextSegment segment1 = TextSegment.from("I like football.");
         Embedding testEmbedding = embeddingModel.embed(segment1).content();
+        assertNotNull(testEmbedding, "embedding model should produce a 
non-null embedding");
 
         Message first = fluentTemplate.to("langchain4j-embeddingstore:first")
                 .withBody(testEmbedding)
                 .request(Message.class);
-
+        assertNotNull(first, "response message should not be null");

Review Comment:
   _Claude Code on behalf of gnodet_
   
   Addressed — split `testSimpleEmbedding` into two separate tests:
   
   1. **`testEmbeddingModel`** — meaningful assertions on the embedding model 
output (non-null, non-empty vector). This runs without infrastructure.
   2. **`testStoreRouting`** — `@Disabled` until a Weaviate instance is 
available via Testcontainers. This test includes a non-empty body content 
assertion (`assertFalse(body.isEmpty())`) so it will verify real store content 
once enabled.
   
   This avoids pretending we're testing the store when Weaviate isn't running.



-- 
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]

Reply via email to