Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ protected void setupResources() throws Exception {
if (cacheContainer == null) {
cacheContainer = getCacheContainer();
final IterationBoundedBudget budget
= Budgets.iterationBudget().withInterval(Duration.ofSeconds(1)).withMaxIterations(10).build();
= Budgets.iterationBudget().withInterval(Duration.ofSeconds(2)).withMaxIterations(15).build();
final ForegroundTask task = Tasks.foregroundTask()
.withBudget(budget).build();

Expand All @@ -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");
Comment on lines +229 to +231
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor Author

@gnodet gnodet Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

return true;
} catch (Exception e) {
return false;
Expand All @@ -251,6 +254,8 @@ private ConfigurationBuilder getConfiguration() {
clientBuilder.addServer()
.host(service.host())
.port(service.port());
clientBuilder.socketTimeout(15000)
.connectionTimeout(15000);

clientBuilder.security()
.authentication()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ protected ConfigurationBuilder getConfiguration() {
.host(service.host())
.port(service.port());

clientBuilder
.socketTimeout(15000)
.connectionTimeout(15000);

// add security info
clientBuilder
.security()
Expand Down
Loading