You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using version 4.1.1 the same can be reproduced with a JUnit testwhich runs multiple times and happens more often with smaller "atMost" duration.
E.g. on my computer for "atMost" of1 milliseconds Exception comes in about 70% of all runs, for 2msec about 5%, for 5 msec about 0.2%.
@RunWith(Parameterized.class)
public class AwaitilityTest {
@Parameterized.Parameters
public static Object[][] hundredTimes() {
return new Object[1000][0];
}
@Test
public void awaitilityTest() {
Awaitility.await().atMost(5, TimeUnit.MILLISECONDS).pollInterval(500, TimeUnit.NANOSECONDS).until(() -> true);
}
}
Stack trace:
org.awaitility.core.ConditionTimeoutException: Condition with AwaitilityTest was not fulfilled within 5 milliseconds.
at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:164)
at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)
at org.awaitility.core.CallableCondition.await(CallableCondition.java:26)
at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:939)
at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:908)
at AwaitilityTest.awaitilityTest(AwaitilityTest.java:17)
[...]
Condition does not get evaluated correctly with small intervals
We have some issues when waiting till certain event are sent to a Kafka broker when they happen in rapid succession.
here under a small example which reproduces the issue inconsistently.
version used:
The text was updated successfully, but these errors were encountered: