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

   ## Summary
   
   Fixes two bugs in `camel-test-infra-ibmmq` reported by Claus Ibsen, which 
cause `camel infra run ibmmq` to display incorrect service information.
   
   ## Root Cause
   
   **Bug 1 — Empty password:** `IbmMQLocalContainerInfraService` starts the 
container with `MQ_APP_PASSWORD=passw0rd` but never overrides `password()` from 
`IbmMQInfraService`, which returns an empty string by default. The `camel infra 
run ibmmq` command therefore reports an empty password.
   
   **Bug 2 — Wrong AMQP URL:** `IbmMQInfraService.brokerUrl()` returned 
`amqp://localhost:1414`. Port 1414 is the native IBM MQ wire protocol port (MQ 
Telemetry / JMS native). IBM MQ listens for AMQP connections on port **5672** 
(the standard AMQP port). The container also did not expose port 5672.
   
   ## Fix
   
   1. `IbmMQLocalContainerInfraService`: add `password()` override returning 
`IbmMQProperties.DEFAULT_APP_PASSWORD` (`passw0rd`).
   2. `IbmMQInfraService`: fix the default `brokerUrl()` to use port 5672 (for 
external/remote service usage).
   3. `IbmMQLocalContainerInfraService`: add `MQ_AMQP_PORT = 5672` constant, 
expose port 5672 in the container configuration, and override `brokerUrl()` to 
return the dynamically mapped AMQP port from Testcontainers.
   
   ## Tests
   
   This module has no unit tests (it is a test-infra module that requires a 
running IBM MQ instance). The fix is verified by:
   - Compile passes locally (`./mvnw verify -pl 
test-infra/camel-test-infra-ibmmq -am -B -Dquickly`)
   - Code inspection: `password()` now returns `passw0rd`, `brokerUrl()` now 
returns the correct AMQP URL (`amqp://<host>:<mapped-5672>`)
   
   Fixes: https://issues.apache.org/jira/browse/CAMEL-27764
   
   ---
   _Hermes Agent (Claude Sonnet 4.6) on behalf of Guillaume Nodet_
   


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