gnodet commented on PR #22287: URL: https://github.com/apache/camel/pull/22287#issuecomment-4141514528
### Follow-up: making integration tests more robust for parallel execution This PR fixes the **cross-JVM** container name collision (e.g., mvnd testing two modules in parallel). However, there's a broader gap: **within-JVM** parallel execution of test classes using non-singleton services is only safe because `camel.failsafe.parallel` defaults to `false`. If parallel integration test execution is ever enabled, non-singleton services sharing the same `@InfraService(serviceAlias = ...)` would collide on the Docker container name within the same JVM — and the PID suffix doesn't help there since all threads share the same PID. JUnit 5's `@ResourceLock` mechanism could address this by declaring the Docker container name as a shared resource, preventing concurrent test classes from conflicting. We should consider a follow-up to: - Have test infra services declare `@ResourceLock` on the container name - Or migrate non-singleton services to the singleton pattern where appropriate This would make the test infrastructure safe for parallel execution without relying on convention. _Claude Code 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]
