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

untilNot feature #51

Closed
lsliwko opened this issue Jul 12, 2016 · 2 comments
Closed

untilNot feature #51

lsliwko opened this issue Jul 12, 2016 · 2 comments

Comments

@lsliwko
Copy link

lsliwko commented Jul 12, 2016

Add untilNot( () -> checkIfCrashedError() ) feature

Idea is to wait x sec and throw exception if condition is meet.
Example:

publish(message)
awaits().atMost(5, SECONDS).untilNot( () -> errorQueue.size()==0 )

Awesome project!
Just my 0.02

@johanhaleby
Copy link
Collaborator

johanhaleby commented Jul 12, 2016

I hear what you're saying but I'm a bit skeptical. The reason is that Awaitility already integrates with Hamcrest matchers which allows you to do:

await().atMost(5, SECONDS).until( errorQueue::size, not(equalTo(0)) )

Which is more composable and does not require an increase of the API.

@lsliwko
Copy link
Author

lsliwko commented Jul 12, 2016

That would also do
Thanks!

@lsliwko lsliwko closed this as completed Jul 12, 2016
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

No branches or pull requests

2 participants