Skip to content

CAMEL-23253: Fix flaky Infinispan Hot Rod connection timeout in tests#22265

Closed
gnodet wants to merge 2 commits intomainfrom
CAMEL-23253-infinispan-hotrod-timeout
Closed

CAMEL-23253: Fix flaky Infinispan Hot Rod connection timeout in tests#22265
gnodet wants to merge 2 commits intomainfrom
CAMEL-23253-infinispan-hotrod-timeout

Conversation

@gnodet
Copy link
Contributor

@gnodet gnodet commented Mar 25, 2026

Summary

  • Add socketTimeout(15000) and connectionTimeout(15000) to InfinispanRemoteTestSupport.getConfiguration() and LangChain4jEmbeddingsComponentInfinispanTargetIT.getConfiguration() — the default Hot Rod timeout (2000ms) is too short for CI environments
  • Add a protobuf metadata cache readiness check (___protobuf_metadata) in the test's createCache() method — the Infinispan server's internal protobuf subsystem may not be ready even when custom cache creation succeeds, causing ISPN005066: Cache '___protobuf_metadata' is not ready during route startup
  • Increase retry budget from 10s (10×1s) to 30s (15×2s) for slow CI environments (especially JDK 25)
  • Aligns timeout configuration with the pattern already used by SpringInfinispanRemoteIdempotentRepositoryTestSupport, InfinispanRemoteClusteredTestSupport, and InfinispanRemoteConfigurationIT

Fixes: CAMEL-23253

Claude Code on behalf of Guillaume Nodet

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using build-all, build-dependents, skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@gnodet gnodet requested review from cunningt and oscerd March 25, 2026 17:15
@github-actions
Copy link
Contributor

github-actions bot commented Mar 25, 2026

🧪 CI tested the following changed modules:

  • components/camel-ai/camel-langchain4j-embeddings
  • components/camel-infinispan/camel-infinispan
All tested modules (76 modules)
  • Camel :: AI :: LangChain4j :: Embedding
  • Camel :: AI :: LangChain4j :: Embedding [jar]
  • Camel :: AI :: LangChain4j :: EmbeddingStore
  • Camel :: AI :: LangChain4j :: EmbeddingStore [jar]
  • Camel :: All Components Sync point
  • Camel :: All Components Sync point [pom]
  • Camel :: Assembly
  • Camel :: Assembly [pom]
  • Camel :: Catalog :: CSimple Maven Plugin (deprecated) [maven-plugin]
  • Camel :: Catalog :: CSimple Maven Plugin (deprecated) SUCCESS [ 1.138 s]
  • Camel :: Catalog :: Camel Catalog
  • Camel :: Catalog :: Camel Catalog [jar]
  • Camel :: Catalog :: Camel Report Maven Plugin
  • Camel :: Catalog :: Camel Report Maven Plugin [maven-plugin]
  • Camel :: Catalog :: Camel Route Parser
  • Camel :: Catalog :: Camel Route Parser [jar]
  • Camel :: Catalog :: Console
  • Camel :: Catalog :: Console [jar]
  • Camel :: Catalog :: Dummy Component
  • Camel :: Catalog :: Dummy Component [jar]
  • Camel :: Catalog :: Lucene (deprecated)
  • Camel :: Catalog :: Lucene (deprecated) [jar]
  • Camel :: Catalog :: Maven
  • Camel :: Catalog :: Maven [jar]
  • Camel :: Catalog :: Suggest
  • Camel :: Catalog :: Suggest [jar]
  • Camel :: Component DSL
  • Camel :: Component DSL [jar]
  • Camel :: Coverage
  • Camel :: Coverage [pom]
  • Camel :: Docs
  • Camel :: Docs [pom]
  • Camel :: Endpoint DSL
  • Camel :: Endpoint DSL [jar]
  • Camel :: Endpoint DSL :: Support
  • Camel :: Endpoint DSL :: Support [jar]
  • Camel :: Infinispan :: Remote
  • Camel :: Infinispan :: Remote [jar]
  • Camel :: Integration Tests
  • Camel :: Integration Tests [jar]
  • Camel :: JBang :: Core
  • Camel :: JBang :: Core [jar]
  • Camel :: JBang :: Integration tests
  • Camel :: JBang :: Integration tests [jar]
  • Camel :: JBang :: MCP
  • Camel :: JBang :: MCP [jar]
  • Camel :: JBang :: Main
  • Camel :: JBang :: Main [jar]
  • Camel :: JBang :: Plugin :: Edit
  • Camel :: JBang :: Plugin :: Edit [jar]
  • Camel :: JBang :: Plugin :: Generate
  • Camel :: JBang :: Plugin :: Generate [jar]
  • Camel :: JBang :: Plugin :: Kubernetes
  • Camel :: JBang :: Plugin :: Kubernetes [jar]
  • Camel :: JBang :: Plugin :: Route Parser
  • Camel :: JBang :: Plugin :: Route Parser [jar]
  • Camel :: JBang :: Plugin :: Testing
  • Camel :: JBang :: Plugin :: Testing [jar]
  • Camel :: JBang :: Plugin :: Validate
  • Camel :: JBang :: Plugin :: Validate [jar]
  • Camel :: Kamelet Main
  • Camel :: Kamelet Main [jar]
  • Camel :: Launcher
  • Camel :: Launcher [jar]
  • Camel :: Launcher :: Container
  • Camel :: Launcher :: Container [pom]
  • Camel :: YAML DSL
  • Camel :: YAML DSL [jar]
  • Camel :: YAML DSL :: Deserializers
  • Camel :: YAML DSL :: Deserializers [jar]
  • Camel :: YAML DSL :: Maven Plugins
  • Camel :: YAML DSL :: Maven Plugins [maven-plugin]
  • Camel :: YAML DSL :: Validator
  • Camel :: YAML DSL :: Validator [jar]
  • Camel :: YAML DSL :: Validator Maven Plugin
  • Camel :: YAML DSL :: Validator Maven Plugin [maven-plugin]

…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>
Comment on lines +229 to +231
// Verify the protobuf metadata cache is also ready, as the Infinispan
// component needs it when the route starts
cacheContainer.getCache("___protobuf_metadata");
Copy link
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
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

@apupier
Copy link
Contributor

apupier commented Mar 26, 2026

should be covered by #22278

@gnodet gnodet closed this Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants