Search in sources :

Example 6 with IdlenessTimer

use of org.apache.flink.api.common.eventtime.WatermarksWithIdleness.IdlenessTimer in project flink by apache.

the class WatermarksWithIdlenessTest method testActiveAfterIdleness.

@Test
public void testActiveAfterIdleness() {
    final ManualClock clock = new ManualClock(System.nanoTime());
    final IdlenessTimer timer = createTimerAndMakeIdle(clock, Duration.ofMillis(10));
    timer.activity();
    assertFalse(timer.checkIfIdle());
}
Also used : ManualClock(org.apache.flink.util.clock.ManualClock) IdlenessTimer(org.apache.flink.api.common.eventtime.WatermarksWithIdleness.IdlenessTimer) Test(org.junit.Test)

Aggregations

IdlenessTimer (org.apache.flink.api.common.eventtime.WatermarksWithIdleness.IdlenessTimer)6 ManualClock (org.apache.flink.util.clock.ManualClock)5 Test (org.junit.Test)5