gnodet commented on code in PR #22287:
URL: https://github.com/apache/camel/pull/22287#discussion_r2999970956
##########
test-infra/camel-test-infra-common/src/main/java/org/apache/camel/test/infra/common/services/ContainerEnvironmentUtil.java:
##########
@@ -114,6 +114,9 @@ public static String containerName(Class cls) {
if (annotation.serviceImplementationAlias().length > 0) {
name += "-" + annotation.serviceImplementationAlias()[0];
}
+ // Append PID to avoid Docker container name conflicts when
multiple
+ // modules run tests in parallel (e.g., via mvnd with multiple
threads)
+ name += "-" + ProcessHandle.current().pid();
Review Comment:
To be clear, the above analysis is not specific to Elasticsearch —
`ContainerEnvironmentUtil.containerName()` is used by all ~30 test infra
services (Kafka, MongoDB, Redis, etc.). The same collision would happen
whenever two modules sharing the same test infra service are tested in parallel
in separate JVMs. The PID suffix fix applies globally to all of them.
_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]