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

   [CAMEL-23431](https://issues.apache.org/jira/browse/CAMEL-23431)
   
   ## Summary
   
   - Migrate 18 test files in `camel-platform-http-vertx`, 
`camel-platform-http-main`, and `camel-openapi-validator` from 
`AvailablePortFinder` to true port-0 binding
   - Fix `MainHttpServer.getPort()` to return actual bound port after start 
(aligning with `VertxPlatformHttpServer.getPort()` which already returns 
`server.actualPort()`)
   - Add `createCamelContext()` (no-arg) and `startCamelContext(context)` 
helpers in `VertxPlatformHttpEngineTest` for port-0 tests
   
   ## Approach
   
   True port-0 binding: pass 0 to the server, let the OS assign an ephemeral 
port, then read the actual port back after start. This eliminates TOCTOU race 
conditions where a reserved port could be taken by another process between 
reservation and binding.
   
   Only tests where the port is NOT baked into route URIs at definition time 
are converted. Tests where port appears in `from()/to()/toF()` route URIs are 
left unchanged.
   
   ## Test plan
   
   - [x] `mvn test -pl components/camel-openapi-validator` — 6/6 pass
   - [x] `mvn test -pl components/camel-platform-http-main` — 10/10 pass
   - [x] `mvn test -pl components/camel-platform-http-vertx` — 114/114 pass


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