CAMEL-23253: Fix flaky Infinispan Hot Rod connection timeout in tests#22265
CAMEL-23253: Fix flaky Infinispan Hot Rod connection timeout in tests#22265
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
|
🧪 CI tested the following changed modules:
All tested modules (76 modules)
|
…ng routes The ___protobuf_metadata internal cache may not be ready when the custom cache creation succeeds. This causes FailedToStartRouteException with ISPN005066. Also increase retry budget (2s interval, 15 iterations) for slow CI. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
| // Verify the protobuf metadata cache is also ready, as the Infinispan | ||
| // component needs it when the route starts | ||
| cacheContainer.getCache("___protobuf_metadata"); |
There was a problem hiding this comment.
this sounds like a workaround for a potential bug in the component. Shouldn't the component be able to wait that the cache is ready?
There was a problem hiding this 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've filed CAMEL-23255 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
|
should be covered by #22278 |
Summary
socketTimeout(15000)andconnectionTimeout(15000)toInfinispanRemoteTestSupport.getConfiguration()andLangChain4jEmbeddingsComponentInfinispanTargetIT.getConfiguration()— the default Hot Rod timeout (2000ms) is too short for CI environments___protobuf_metadata) in the test'screateCache()method — the Infinispan server's internal protobuf subsystem may not be ready even when custom cache creation succeeds, causingISPN005066: Cache '___protobuf_metadata' is not readyduring route startupSpringInfinispanRemoteIdempotentRepositoryTestSupport,InfinispanRemoteClusteredTestSupport, andInfinispanRemoteConfigurationITFixes: CAMEL-23253
Claude Code on behalf of Guillaume Nodet