Skip to content
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

Introduced await as a more feature rich version of eventually for whe… #888

Merged
merged 5 commits into from
Jul 16, 2019

Conversation

sksamuel
Copy link
Member

…n you want to use custom polling periods #793

@sksamuel sksamuel requested a review from LeoColman July 15, 2019 02:37
@LeoColman
Copy link
Member

LeoColman commented Jul 16, 2019

Did you bring these guys straight from Awaitility? Some of them?

@@ -1,5 +1,8 @@
package io.kotlintest
package io.kotlintest.eventually
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving this guy to another package breaks client's code.

If it breaks already, we don't even need to deprecate, I suppose

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add a deprecated alias.

class FibonacciPollInterval(private val base: Duration, private val offset: Int) : PollInterval {

init {
if (offset <= -1) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

require(offset >0) { "message" }

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

*
* @since 1.7.0
*/
interface PollInterval {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to improve docs on this class

@LeoColman
Copy link
Member

I think that await might not be the best name here.

It is very used in CoRoutines

@sksamuel
Copy link
Member Author

await is only used in coroutines as part of deferred, not as a standalone function, so it won't clash. I could call it until.

@sksamuel
Copy link
Member Author

I've renamed it until, added better (not copied) docs, and moved eventually back to the original package.

Please merge if you're happy.

@sksamuel sksamuel merged commit 0f3b8fe into master Jul 16, 2019
@LeoColman LeoColman deleted the feature/793 branch November 2, 2019 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants