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

   [CAMEL-23431](https://issues.apache.org/jira/browse/CAMEL-23431)
   
   ## Summary
   
   Second PR for CAMEL-23431. Migrates `camel-lumberjack` (5 test files) and 
`camel-ssh` (3 test files) from `AvailablePortFinder` to port-0 `ServerSocket` 
binding, eliminating the TOCTOU race condition.
   
   **Lumberjack changes:**
   - Add `getLocalPort()` to `LumberjackServer` (reads actual port from Netty 
channel) and `LumberjackConsumer`
   - All 5 tests now use `from("lumberjack:0.0.0.0:0")` and read back the 
actual port from the consumer for client connections
   
   **SSH changes:**
   - `SshComponentTestSupport`: Start `SshServer` with port 0, read back via 
`sshd.getPort()` — all 7+ subclasses automatically work
   - `SshIdleTimeoutTest`: Start delayed server in `doPreSetup()` with port 0
   - `SshAlgorithmParametersTest`: Use dummy port 0 (no connection is made, 
only algorithm inspection)
   
   ## Test plan
   - [x] `mvn test` in `camel-lumberjack` — 5 tests pass
   - [x] `mvn test` in `camel-ssh` — 39 tests pass
   - [ ] CI green


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