Description
Module
None
Problem
I have a JUnit test extension that starts up a container. If multiple tests are executing in parallel in isolated JVMs, they contend for the container name and port bindings. One can work around this by giving it effectively infinite startup attempts and a reasonable startup timeout, but this generates excessive test logs from constant startup attempts.
Solution
Introduce a startup attempt backoff strategy option when constructing a container. Being able to exponentially backoff to a reasonable interval between startup attempts would help in reducing logs.
Benefit
This would benefit any situation where there is contention for exclusive resources between container instances, or any other situation where container startups are very flaky for an extended period, but eventual success is likely.
Alternatives
At the moment I'm using Awaitility to check for container name contention before attempting startup.
Would you like to help contributing this feature?
Yes