-
-
Notifications
You must be signed in to change notification settings - Fork 292
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
[Enhancement]: Add convenient features to wait strategies #827
Comments
@HofmeisterAn , are you thinking something like this? jlevier@a702c92 |
Yes, something like that. I do not have a particular implementation in mind. Ideally, it should not break any existing configurations and allow us to configure each wait strategy individual. I will take a look at your proposal during the weekend. |
👋 @HofmeisterAn don't mean to bother but was wondering if you had time to review? Please let me know, thanks. |
You're not bothering me at all. Thanks for reminding me, in fact, I almost forgot to reply. I've looked at it a few days ago. I think having options to configure the wait strategies is a good idea. However, we should allow configuring each wait strategy individually. Without taking a closer look, it's difficult to say which changes we exactly need, but I think having a proper base class for each wait strategy could be a good start, similar to the Wait.ForUnixContainer()
.AddCustomWaitStrategy(new UntilMessageIsLogged(string.Empty).WithBackoffStrategy(...))
.AddCustomWaitStrategy(new UntilMessageIsLogged(string.Empty).WithBackoffStrategy(...)) It may be necessary to extend IWaitUntil, which I am trying to avoid. Rather than introducing any breaking changes, I would prefer to offer a smooth transition to a better API, if needed. |
I see what you mean about allowing configuration on each wait strategy individually. I totally agree with that level of granularity. Let me look into this further. Thanks. |
Ok, @HofmeisterAn here is the take 2 attempt. jlevier@fbe994d |
Thank you for your update on the proposal.
Indeed, exposing the configurations to the I have reviewed your proposal and have created a follow-up proposal that includes a dedicated type for receiving the wait strategy implementation and additional features such as the backoff strategy. Although I am not entirely satisfied with the names used, they can be revised later. I am curious what do you think about it: compare/feature/propose-wait-strategy-changes. As What are your thoughts on this approach? |
@HofmeisterAn, thank you for your feedback and sorry it has taken me so long to get back to you on this. I think I know what you are saying but might need some clarification. Would we intend to actually call this https://github.com/testcontainers/testcontainers-dotnet/compare/feature/propose-wait-strategy-changes#diff-ca8e5f81c5dc6550efd7888bc6dd66184966a85b244da3d2b0dcc9a235db6530R7 something like |
No worries. Indeed, that is true. However, wouldn't it break current configurations? I'm trying to avoid interfering with existing wait strategies and find something that enables us to proceed with the suggested changes once we introduce a new major version. |
Problem
The wait strategies in Testcontainers for .NET would benefit from refactoring. Currently, the wait strategies lack several convenient features, such as individual retry counts, timeouts, frequencies, etc.
Solution
-
Benefit
-
Alternatives
-
Would you like to help contributing this enhancement?
Yes
The text was updated successfully, but these errors were encountered: