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
Unpredictable behavior around during
and atMost
of Awaitility
#180
Comments
@johanhaleby I have seen this issue is under discussion also in Google Groups. I was wondering if I can help you with this - it is a long time since my last contribution :-) - but I would like to ask for a little guidance here if possible. So for example a branch with some failing tests that describe the expected behaviour and that I can make "green" with my contribution. Would this be a good approach/a help for you? |
@grofoli Thanks a lot for wanting to help :) @uraniumdawn Could you perhaps provide a test case that shows the failing behavior? |
@johanhaleby Code snippet mentioned in ahead of this topic actually fails. And could be used as a test case suppose. |
@johanhaleby @uraniumdawn I would really appreciate 2-3 unit tests that describe the expected behavior. Maybe I miss something here, does it really makes sense to use |
@grofoli As I said previously, I had to be sure that Kafka's topic doesn't receive new messages for a specific time. That is why I used |
If you use public static void main(String[] args) {
List<String> list = new ArrayList<>();
await("wait").during(5_000, TimeUnit.MILLISECONDS).atMost(5_500, TimeUnit.MILLISECONDS)
.pollInterval(100, TimeUnit.MILLISECONDS)
.until(() -> list, List::isEmpty);
} |
@johanhaleby @grofoli @0xERR0R |
@uraniumdawn Should we close this issue? |
@johanhaleby Yes |
While I was testing Kafka I end up with some issues around Awaitility. The goal was to test that Kafka topic doesn't contain the new records for a specified time. This is the simplified scratch of my test but it shows the problem. I expect that ConditionTimeoutException doesn't throw in this case. But it does.
I increased the atMost timeout to 5000 + pollInterval -> 5100 but still end up with an exception. On my local machine throwing exception was stoped closed the value of atMost timeout of 5170-5180. Should I keep something in mind? Or may the test isn't correct?
The text was updated successfully, but these errors were encountered: