diff --git a/crux-util/src/test/java/com/fizzed/crux/util/RunEveryTest.java b/crux-util/src/test/java/com/fizzed/crux/util/RunEveryTest.java index ff13692..833b88f 100644 --- a/crux-util/src/test/java/com/fizzed/crux/util/RunEveryTest.java +++ b/crux-util/src/test/java/com/fizzed/crux/util/RunEveryTest.java @@ -4,6 +4,8 @@ import static com.fizzed.crux.util.TimeDuration.millis; import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.Matchers.greaterThan; +import static org.hamcrest.Matchers.lessThan; import static org.junit.Assert.*; import static com.fizzed.crux.util.RunEvery.runEvery; @@ -20,7 +22,8 @@ public void testRunEvery() throws InterruptedException { Thread.sleep(100L); } - assertThat(runCount, is(2)); + assertThat(runCount.value(), greaterThan(1)); + assertThat(runCount.value(), lessThan(4)); } } \ No newline at end of file