-
Notifications
You must be signed in to change notification settings - Fork 27
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
proposal: Eventually
checker
#121
Comments
For both APIs, my mind immediately goes to: you mention the default limits (5s and 100ms), but not the initial frequency at which the tries are done. Does it start at every 1ms? 100ms?
This sentence confused me at first; I wasn't sure if you meant that each check try should complete fast, or that the entire retry strategy should have a shorter total duration. I think you mean the latter; perhaps best to be explicit, like:
|
For anyone stumbling upon this, here's some context on the retry API: https://pkg.go.dev/github.com/rogpeppe/retry |
This looks great! It would be nice to try to improve how the strategy is provided. One option is to make qt.Assert(f, qt.Eventually(qt.Equals), 42)
qt.Assert(f, qt.Eventually(qt.IsNil)) which reads well. And, when needed, a customized strategy can be provided: qt.Assert(f, qt.Eventually(qt.Equals).WithStrategy(s), 42) Similarly, What do you think? |
Here's an idea for an API to make it easier to wait for a given condition to become true:
The text was updated successfully, but these errors were encountered: