You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "apupier (via GitHub)" <gi...@apache.org> on 2026/10/07 09:13:44 UTC
[PR] fix(camel-infinispan): fix test failures on Linux with Podman due to [camel]
apupier opened a new pull request, #27484:
URL: https://github.com/apache/camel/pull/27484
IPv6 loopback resolution
On Linux with Podman, containers are started in host-network mode so that port mappings work without a separate network namespace. In that mode, Testcontainers' container.getHost() returns "localhost". The JVM on recent Linux systems resolves "localhost" to the IPv6 loopback address (::1) before the IPv4 one (127.0.0.1), but the Infinispan server only binds on IPv4. Every fresh RemoteCacheManager therefore failed its initial TCP connection with:
TransportException: finishConnect(..) failed with error(-111):
Connection refused: localhost/[0:0:0:0:0:0:0:1]:11222
Three distinct problems were causing test failures:
1. Initial connection uses the wrong address family All test helpers that built a ConfigurationBuilder passed service.host() (or service.getServiceAddress()) directly to .host(...) / setHosts(...). This caused the IPv6 resolution.
Fix: add a InfinispanRemoteTestSupport.resolvedHost(String) helper that maps "localhost" -> "127.0.0.1" and apply it at every call site: - InfinispanRemoteTestSupport.getConfiguration() - InfinispanRemoteKeyValueRepositoryIT.getConfiguration() - InfinispanRemoteClusteredTestSupport.createConfiguration() - InfinispanRemoteConfigurationIT.getBaseConfiguration() - SpringInfinispanRemoteIdempotentRepositoryTestSupport.setupResources() - InfinispanRemoteEmbeddingStoreIT.createInfinispanRemoteConfiguration()
2. Topology-aware client intelligence re-resolves "localhost" to ::1 When BASIC client intelligence was not set, the Hotrod client asked the server for a topology update after the initial connection and re-connected to the advertised address, which was again "localhost" -> ::1. The conditional guard if (!Boolean.getBoolean(INFINISPAN_CONTAINER_NETWORK_MODE_HOST)) wrongly skipped BASIC mode in host-network mode, meaning every new RemoteCacheManager created inside a @BeforeEach would fail on the topology-driven reconnect.
Fix: always set BASIC client intelligence unconditionally in all test ConfigurationBuilders; remove the now-unused InfinispanProperties import.
3. TransportException not retried during schema registration InfinispanRemoteManager.registerSchemaWithRetry() caught HotRodClientException but immediately re-threw any exception that was not an IllegalLifecycleStateException (line: "if (!isIllegalLifecycleStateException(e)) throw e"). TransportException is a HotRodClientException subclass representing a transient connectivity failure; on the very first retry attempt it escaped the loop, task.run() returned false, and the method threw IllegalStateException("Failed to register schema after PT1M") without actually waiting.
Fix: add isTransportException() and treat TransportException as a retriable condition alongside IllegalLifecycleStateException. This is also correct in production: if the server is briefly unreachable at startup (e.g. Kubernetes rolling deploy), schema registration should retry within the configured timeout rather than fail immediately.
Additionally, waitForCacheReady() in InfinispanRemoteTestSupport only ignored RemoteIllegalLifecycleStateException; it now also ignores TransportException so that transient startup races do not immediately fail the Awaitility condition.
Co-authored-by: IBM Bob 2.2.1
# Description
<!--
- Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
-->
# Target
- [ ] I checked that the commit is targeting the correct branch (Camel 4 uses the `main` branch)
# Tracking
- [ ] If this is a large change, bug fix, or code improvement, I checked there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for the change (usually before you start working on it).
<!--
# *Note*: trivial changes like, typos, minor documentation fixes and other small items do not require a JIRA issue. In this case your pull request should address just this issue, without pulling in other changes.
-->
# Apache Camel coding standards and style
- [ ] I checked that each commit in the pull request has a meaningful subject line and body.
<!--
If you're unsure, you can format the pull request title like `[CAMEL-XXX] Fixes bug in camel-file component`, where you replace `CAMEL-XXX` with the appropriate JIRA issue.
-->
- [ ] I have run `mvn clean install -DskipTests` locally from root folder and I have committed all auto-generated changes.
<!--
You can run the aforementioned command in your module so that the build auto-formats your code. This will also be verified as part of the checks and your PR may be rejected if if there are uncommited changes after running `mvn clean install -DskipTests`.
You can learn more about the contribution guidelines at https://github.com/apache/camel/blob/main/CONTRIBUTING.md
-->
# AI-assisted contributions
- [ ] If this PR includes AI-generated code, commits have proper co-authorship attribution (e.g., `Co-authored-by` trailers) and the PR description identifies the AI tool used.
--
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: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(camel-infinispan): fix test failures on Linux with Podman due to IPv6 loopback resolution [camel]
Posted by "apupier (via GitHub)" <gi...@apache.org>.
apupier merged PR #27484:
URL: https://github.com/apache/camel/pull/27484
--
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: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(camel-infinispan): fix test failures on Linux with Podman due to IPv6 loopback resolution [camel]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #27484:
URL: https://github.com/apache/camel/pull/27484#issuecomment-6035339779
<!-- ci-tested-modules -->
:test_tube: **CI tested the following changed modules:**
- `components/camel-infinispan/camel-infinispan`
---
<details><summary>:microscope: Scalpel shadow comparison — Scalpel: 11 of 699 tested, 27 compile-only — current: 11 all tested</summary>
[Maveniverse Scalpel](https://github.com/maveniverse/scalpel) detected **11 affected modules** (current approach: 11).
**Skip-tests mode would test 11 modules** (1 direct + 10 downstream), **skip tests for 27** (generated code, meta-modules)
<details><summary>Modules Scalpel would test (11)</summary>
- `camel-infinispan` ← components/camel-infinispan/camel-infinispan/src/main/java/org/apache/camel/component/infinispan/remote/InfinispanRemoteManager.java, components/camel-infinispan/camel-infinispan/src/test/java/org/apache/camel/component/infinispan/remote/InfinispanRemoteConfigurationIT.java, components/camel-infinispan/camel-infinispan/src/test/java/org/apache/camel/component/infinispan/remote/InfinispanRemoteEmbeddingStoreIT.java, components/camel-infinispan/camel-infinispan/src/test/java/org/apache/camel/component/infinispan/remote/InfinispanRemoteKeyValueRepositoryIT.java, components/camel-infinispan/camel-infinispan/src/test/java/org/apache/camel/component/infinispan/remote/InfinispanRemoteTestSupport.java, components/camel-infinispan/camel-infinispan/src/test/java/org/apache/camel/component/infinispan/remote/cluster/InfinispanRemoteClusteredTestSupport.java, components/camel-infinispan/camel-infinispan/src/test/java/org/apache/camel/component/infinispan/remote/spring/
SpringInfinispanRemoteIdempotentRepositoryTestSupport.java
- `camel-jbang-mcp` ← downstream of org.apache.camel:camel-catalog
- `camel-jbang-plugin-mcp` ← downstream of org.apache.camel:camel-jbang-core
- `camel-jbang-plugin-route-parser` ← downstream of org.apache.camel:camel-route-parser
- `camel-jbang-plugin-tui` ← downstream of org.apache.camel:camel-catalog
- `camel-jbang-plugin-validate` ← downstream of org.apache.camel:camel-yaml-dsl-validator
- `camel-langchain4j-embeddings` ← downstream of org.apache.camel:camel-infinispan
- `camel-langchain4j-embeddingstore` ← downstream of org.apache.camel:camel-langchain4j-embeddings
- `camel-launcher-container` ← downstream of org.apache.camel:camel-launcher
- `camel-yaml-dsl-validator` ← downstream of org.apache.camel:camel-catalog
- `camel-yaml-dsl-validator-maven-plugin` ← downstream of org.apache.camel:camel-yaml-dsl-validator
</details>
<details><summary>Modules with tests skipped (27)</summary>
- `apache-camel`
- `camel-allcomponents`
- `camel-catalog`
- `camel-catalog-console`
- `camel-catalog-maven`
- `camel-catalog-suggest`
- `camel-componentdsl`
- `camel-endpointdsl`
- `camel-endpointdsl-support`
- `camel-itest`
- `camel-jbang-core`
- `camel-jbang-it`
- `camel-jbang-main`
- `camel-jbang-plugin-edit`
- `camel-jbang-plugin-generate`
- `camel-jbang-plugin-kubernetes`
- `camel-jbang-plugin-test`
- `camel-kamelet-main`
- `camel-launcher`
- `camel-report-maven-plugin`
- `camel-route-parser`
- `camel-yaml-dsl`
- `camel-yaml-dsl-deserializers`
- `camel-yaml-dsl-maven-plugin`
- `coverage`
- `docs`
- `dummy-component`
</details>
> :information_source: Shadow mode — Scalpel observes but does not affect test execution. [Learn more](https://github.com/maveniverse/scalpel)
</details>
:warning: **Some tests are disabled on GitHub Actions** (`@DisabledIfSystemProperty(named = "ci.env.name")`) and require manual verification:
- `components/camel-infinispan/camel-infinispan`: 2 test(s) disabled on GitHub Actions
<details><summary>All tested modules (38 modules, 6m 14s total)</summary>
**Total reactor time:** 6m 14s
| Module | Duration | Status |
| --- | --- | --- |
| Camel :: Launcher | 51.4s | SUCCESS |
| Camel :: JBang :: Plugin :: TUI | 43.9s | SUCCESS |
| Camel :: JBang :: MCP | 43.4s | SUCCESS |
| Camel :: Catalog :: Camel Catalog | 24.3s | SUCCESS |
| Camel :: YAML DSL :: Validator | 21.7s | SUCCESS |
| Camel :: AI :: LangChain4j :: EmbeddingStore | 21.6s | SUCCESS |
| Camel :: Component DSL | 19.9s | SUCCESS |
| Camel :: YAML DSL | 19.4s | SUCCESS |
| Camel :: JBang :: Plugin :: Validate | 16.3s | SUCCESS |
| Camel :: Docs | 15.6s | SUCCESS |
| Camel :: Kamelet Main | 15.2s | SUCCESS |
| Camel :: JBang :: Plugin :: Testing | 13.2s | SUCCESS |
| Camel :: Catalog :: Camel Report Maven Plugin | 12.7s | SUCCESS |
| Camel :: JBang :: Plugin :: Kubernetes | 10.9s | SUCCESS |
| Camel :: Catalog :: Camel Route Parser | 7.6s | SUCCESS |
| Camel :: YAML DSL :: Deserializers | 7.1s | SUCCESS |
| Camel :: All Components Sync point | 4.6s | SUCCESS |
| Camel :: YAML DSL :: Validator Maven Plugin | 3.6s | SUCCESS |
| Camel :: Catalog :: Suggest (deprecated) | 3.2s | SUCCESS |
| Camel :: YAML DSL :: Maven Plugins | 2.9s | SUCCESS |
| Camel :: Catalog :: Maven | 2.7s | SUCCESS |
| Camel :: Assembly | 1.9s | SUCCESS |
| Camel :: JBang :: Plugin :: Edit | 1.4s | SUCCESS |
| Camel :: Coverage | 1.4s | SUCCESS |
| Camel :: Endpoint DSL :: Support | 1.0s | SUCCESS |
| Camel :: Catalog :: Dummy Component | 1.0s | SUCCESS |
| Camel :: JBang :: Main | 1.0s | SUCCESS |
| Camel :: JBang :: Integration tests | 0.9s | SUCCESS |
| Camel :: JBang :: Plugin :: Generate | 0.9s | SUCCESS |
| Camel :: Catalog :: Console | 0.9s | SUCCESS |
| Camel :: JBang :: Plugin :: Route Parser | 0.8s | SUCCESS |
| Camel :: JBang :: Plugin :: MCP | 0.7s | SUCCESS |
| Camel :: Launcher :: Container | 0.7s | SUCCESS |
| Camel :: AI :: LangChain4j :: Embedding | n/a | |
| Camel :: Endpoint DSL | n/a | |
| Camel :: Infinispan :: Remote | n/a | |
| Camel :: Integration Tests | n/a | |
| Camel :: JBang :: Core | n/a | |
**Top 20 slowest modules:**
- `Camel :: Launcher` (51.4s)
- `Camel :: JBang :: Plugin :: TUI` (43.9s)
- `Camel :: JBang :: MCP` (43.4s)
- `Camel :: Catalog :: Camel Catalog` (24.3s)
- `Camel :: YAML DSL :: Validator` (21.7s)
- `Camel :: AI :: LangChain4j :: EmbeddingStore` (21.6s)
- `Camel :: Component DSL` (19.9s)
- `Camel :: YAML DSL` (19.4s)
- `Camel :: JBang :: Plugin :: Validate` (16.3s)
- `Camel :: Docs` (15.6s)
- `Camel :: Kamelet Main` (15.2s)
- `Camel :: JBang :: Plugin :: Testing` (13.2s)
- `Camel :: Catalog :: Camel Report Maven Plugin` (12.7s)
- `Camel :: JBang :: Plugin :: Kubernetes` (10.9s)
- `Camel :: Catalog :: Camel Route Parser` (7.6s)
- `Camel :: YAML DSL :: Deserializers` (7.1s)
- `Camel :: All Components Sync point` (4.6s)
- `Camel :: YAML DSL :: Validator Maven Plugin` (3.6s)
- `Camel :: Catalog :: Suggest (deprecated)` (3.2s)
- `Camel :: YAML DSL :: Maven Plugins` (2.9s)
</details>
---
:gear: [View full build and test results](https://github.com/apache/camel/actions/runs/37599156609)
--
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: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix(camel-infinispan): fix test failures on Linux with Podman due to IPv6 loopback resolution [camel]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #27484:
URL: https://github.com/apache/camel/pull/27484#issuecomment-6034824264
:star2: Thank you for your contribution to the Apache Camel project! :star2:
:robot: CI automation will test this PR automatically.
:camel: 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 `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](https://camel.apache.org/community/team/#committers) have access to the summary.
:warning: Be careful when sharing logs. Review their contents before sharing them publicly.
--
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: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org