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


##########
components/camel-ai/camel-langchain4j-embeddings/src/test/java/org/apache/camel/component/langchain4j/embeddings/LangChain4jEmbeddingsComponentInfinispanTargetIT.java:
##########
@@ -226,6 +226,9 @@ private RemoteCacheManager getCacheContainer() {
     private boolean createCache() {
         try {
             getOrCreateCache();
+            // Verify the protobuf metadata cache is also ready, as the 
Infinispan
+            // component needs it when the route starts
+            cacheContainer.getCache("___protobuf_metadata");

Review Comment:
   Good point. This is indeed a workaround in the test — the component's 
`InfinispanRemoteManager.doStart()` calls `EmbeddingStoreUtil.registerSchema()` 
synchronously during route startup, which accesses the `___protobuf_metadata` 
cache. If that internal cache isn't ready yet, it fails immediately with no 
retry.
   
   Ideally the component itself should handle this gracefully (e.g., retry 
schema registration on `IllegalLifecycleStateException`). I'll file a follow-up 
JIRA for that. For now, the test-level readiness check ensures the server is 
fully initialized before starting the route.
   
   _Claude Code on behalf of Guillaume Nodet_



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