use of org.apache.flink.streaming.runtime.tasks.StreamIterationHead in project flink by apache.
the class StreamIterationHeadTest method testIterationHeadWatermarkEmission.
@Test
public void testIterationHeadWatermarkEmission() throws Exception {
StreamTaskTestHarness<Integer> harness = new StreamTaskTestHarness<>(StreamIterationHead::new, BasicTypeInfo.INT_TYPE_INFO);
harness.setupOutputForSingletonOperatorChain();
harness.getStreamConfig().setIterationId("1");
harness.getStreamConfig().setIterationWaitTime(1);
harness.invoke();
harness.waitForTaskCompletion();
assertEquals(1, harness.getOutput().size());
assertEquals(new Watermark(Long.MAX_VALUE), harness.getOutput().peek());
}
Aggregations