Respect custom waitStrategy for InfluxDB #1
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
The purpose of this PR is to respect the provided
waitStrategy
for the InfluxDB container, rather than overriding it by default. This change allows the use of a customwaitStrategy
when specified; if none is provided, the defaultwaitStrategy
will be applied, maintaining the same configuration as before this modification.Why is it important?
In the current implementation, it's not possible to use a custom
waitStrategy
and in my case the default strategy marks the container as ready too early. The container is still not ready to receive writes. Customizing thewaitStrategy
to check the/health
status solved this issue. Example log output when container is not ready yet:A different strategy could be employed, for example, to verify if InfluxDB is
ready for queries and writes
as you can see on below health check response:Related issues
How to test this PR
I have added a test that uses a custom
waitStrategy
to verify this behavior.