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
fix EventuallyPredicate, add a producerless version, and inform user … #2046
Conversation
…about predicate failures for #2044
yeah, might as well call it Either way, you need to rework or remove this, as it is incorrect: suspend fun until(duration: Duration, interval: Interval = 1.seconds.fixed(), f: suspend () -> Boolean) =
eventually(duration, interval, f = f) It will return immediately after the first try if that doesn't throw an exception (which until lambdas are not supposed to do) regardless of the returned boolean value. |
That's how eventually has always worked - it looked for exceptions. Now you can additionally evaluate the predicate, combining the power of both eventually and until. |
/** | ||
* Runs a predicate until the predicate returns true as long as the specified duration hasn't passed | ||
*/ | ||
suspend fun eventuallyPredicate( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make this work without requiring the name overload ?
Yes, but |
4.4.1 has been released with until restored and documented
…On Tue, 9 Feb 2021, 04:00 Janek, ***@***.***> wrote:
That's how eventually has always worked - it looked for exceptions.
Yes, but until never worked like that, so this alias was bogus.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#2046 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFVSGWDJ3MYIKTASTM5YFDS6EBTNANCNFSM4XD7XVHA>
.
|
…about predicate failures for #2044