Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow adding container dependencies for Async minion container from ensemblse #30

Closed
lbroudoux opened this issue Jan 26, 2024 · 0 comments
Assignees
Labels
component/runtime Runtime behavior of test container component/settings Relates to API/settings availables kind/enhancement Enhancement of existing feature
Milestone

Comments

@lbroudoux
Copy link
Member

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 a MicrocksContainersEnsemble as it just implements Startable.

It is still possible to do this in a second time by using:

ensemble.getAsyncMinionContainer().dependsOn(kafkaContainer);

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.

@lbroudoux lbroudoux added the kind/enhancement Enhancement of existing feature label Jan 26, 2024
@lbroudoux lbroudoux self-assigned this Jan 26, 2024
@lbroudoux lbroudoux added component/settings Relates to API/settings availables component/runtime Runtime behavior of test container labels Jan 26, 2024
@lbroudoux lbroudoux added this to the 0.2.2 milestone Jan 26, 2024
lbroudoux added a commit that referenced this issue Jan 26, 2024
Signed-off-by: Laurent Broudoux <laurent.broudoux@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/runtime Runtime behavior of test container component/settings Relates to API/settings availables kind/enhancement Enhancement of existing feature
Projects
None yet
Development

No branches or pull requests

1 participant