Why is `WaitStrategy` pub(crate) scope?
It would be incredibly useful to be able to define custom WaitStrategy implementations. For example, checking a port is properly accessible.
It's unclear why the WaitStrategy trait is scoped to pub(crate), effectively removing this capability.
The entire testcontainers(for Rust) implementation was rewritten at some point. So the interface wasn't considered stable.
Making it public would prevent us from breaking change under the hood.
At the same time it's not that common to implement custom wait strategy. Usually, all of them can be useful on the crate level.
I don't think there is any other reason. And I guess we already can consider exposing it, because it's been around for a while already. However it may require some additional changes, because we also use WaitFor enum (custom option is needed)
But, perhaps you can consider contributing to the crate? It might be useful for the community
The entire
testcontainers(for Rust) implementation was rewritten at some point. So the interface wasn't considered stable.Making it public would prevent us from breaking change under the hood.
At the same time it's not that common to implement custom wait strategy. Usually, all of them can be useful on the crate level.
I don't think there is any other reason. And I guess we already can consider exposing it, because it's been around for a while already. However it may require some additional changes, because we also use WaitFor enum (custom option is needed)
But, perhaps you can consider contributing to the crate? It might be useful for the community
In fairness, all I would want personally is a simple 'wait for port to be available' waiting strategy, which when I was looking for it I couldn't find. It exists in the Java equivalent and is quite common to use. Maybe one to consider, I might look into contributing that one soon
Yes, having such a strategy totally makes sense and I would be happy to accept a PR 🙏
But let us know if you won't be able to dedicate time, so we'll add it to the plans