When using the Async mocking feature, the Async minion container must connect to an external broker. If this broker is within another Testcontainer, it may not be started and ready when Async minion tries connecting. Most of the time, this is not a problem as the scheduling will try to reconnect a few seconds later.
However, in some situations - like Kafka, for example - we may face DNS resolution/caching strategies that prevent resolving the host if not present at first resolution.
Description
We need a way to configure dependencies on startup. This is possible on GenericContainer instances but not directly on a MicrocksContainersEnsemble as it just implements Startable.
It is still possible to do this in a second time by using:
Reason/Context
When using the Async mocking feature, the Async minion container must connect to an external broker. If this broker is within another Testcontainer, it may not be started and ready when Async minion tries connecting. Most of the time, this is not a problem as the scheduling will try to reconnect a few seconds later.
However, in some situations - like Kafka, for example - we may face DNS resolution/caching strategies that prevent resolving the host if not present at first resolution.
Description
We need a way to configure dependencies on startup. This is possible on
GenericContainer
instances but not directly on aMicrocksContainersEnsemble
as it just implementsStartable
.It is still possible to do this in a second time by using:
but it may not be easy to use if you're using the fluent
.with().with().with()
API style 😉Implementation ideas
We need a
withAsyncDependsOn()
method at the ensemble level to do the trick.