gnodet opened a new pull request, #29834:
URL: https://github.com/apache/camel/pull/29834

   ## Summary
   
   Fixes [CAMEL-23493](https://issues.apache.org/jira/browse/CAMEL-23493): Most 
kudu tests are silently failing due to automatic skip.
   
   ### Root Cause
   
   The existing test infrastructure uses `kudu-test-utils` (`KuduTestHarness`) 
which calls `FakeDNS.install()` referencing 
`sun.net.spi.nameservice.NameService` — an internal class removed in JDK 9+. On 
JDK 21 this causes a `ClassNotFoundException`. The original 
`IntegrationKuduConfiguration.beforeEach()` swallowed *any* exception and 
silently set `hasKuduHarness=false`, causing all 10 integration tests 
(`KuduProducerTest` ×5, `KuduScanTest` ×5) to be skipped via 
`Assumptions.assumeTrue()` with no failure indication.
   
   ### Fix
   
   Migrate the test infrastructure to Testcontainers using the official 
`apache/kudu` Docker image, following the same pattern used by 
[camel-quarkus](https://github.com/apache/camel-quarkus/blob/main/integration-tests/kudu/src/test/java/org/apache/camel/quarkus/component/kudu/it/KuduTestResource.java).
   
   ### Changes
   
   **`IntegrationKuduConfiguration.java`** — rewritten to implement 
`BeforeAllCallback`/`AfterAllCallback` (class-scoped lifecycle), starting:
   - One **Kudu master** container with `--default_num_replicas=1` (allows 
single-node testing) and advertised host IP so the Java client outside Docker 
can reach it
   - One **Kudu tablet server** container with fixed port binding (required to 
advertise the port before the container starts)
   
   The shared `KuduClient` is marked as user-managed via 
`setUserManagedClient(true)` to prevent Camel from closing it between test 
methods.
   
   **`AbstractKuduTest.java`** — `@RegisterExtension` is now `static` (required 
for `BeforeAllCallback`), uses `isAvailable()` instead of `hasKuduHarness()`.
   
   **`pom.xml`** — removes `kudu-test-utils`, `kudu-binary`, and the 
Linux/x86-only OS/arch profiles; adds `testcontainers`. Tests now run wherever 
Docker is available, including CI on amd64 and arm64.
   
   ### Test Results
   
   All 24 tests pass locally (6 were previously silently skipped):
   ```
   Tests run: 24, Failures: 0, Errors: 0, Skipped: 0
   ```
   
   ---
   _This PR was opened by Hermes Agent on behalf of gnodet._


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