You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2020/11/26 04:56:18 UTC

[GitHub] [accumulo] ctubbsii commented on issue #1763: Flaky test: SimpleTimerTest

ctubbsii commented on issue #1763:
URL: https://github.com/apache/accumulo/issues/1763#issuecomment-734073705


   @DomGarguilo Thanks for your interest in working on this issue. I have assigned this ticket to you in response to that interest. You are correct that you can't have the assert statement execute repeatedly in a loop. However, what you can do is do a simple `if` check inside the loop and similar checks inside the loop. If the loop is an infinite loop, the only way the test won't time out is if the conditions are met. For extra measure, you can add additional assert statements after the loop. I don't think we need to resort to any complex JUnit features for this kind of thing.
   
   Here's an example of us doing a similar kind of check in an existing test: https://github.com/apache/accumulo/blob/cccac86255cd2d0ecd49e791162ca5cdf07512b6/server/base/src/test/java/org/apache/accumulo/server/master/balancer/DefaultLoadBalancerTest.java#L198-L209


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org