use of org.apache.flink.streaming.api.windowing.assigners.GlobalWindows in project flink by apache.
the class GlobalWindowsTest method testWindowAssignment.
@Test
public void testWindowAssignment() {
WindowAssigner.WindowAssignerContext mockContext = mock(WindowAssigner.WindowAssignerContext.class);
GlobalWindows assigner = GlobalWindows.create();
assertThat(assigner.assignWindows("String", 0L, mockContext), contains(GlobalWindow.get()));
assertThat(assigner.assignWindows("String", 4999L, mockContext), contains(GlobalWindow.get()));
assertThat(assigner.assignWindows("String", 5000L, mockContext), contains(GlobalWindow.get()));
}
use of org.apache.flink.streaming.api.windowing.assigners.GlobalWindows in project flink by apache.
the class GlobalWindowsTest method testProperties.
@Test
public void testProperties() {
GlobalWindows assigner = GlobalWindows.create();
assertFalse(assigner.isEventTime());
assertEquals(new GlobalWindow.Serializer(), assigner.getWindowSerializer(new ExecutionConfig()));
assertThat(assigner.getDefaultTrigger(mock(StreamExecutionEnvironment.class)), instanceOf(GlobalWindows.NeverTrigger.class));
}
Aggregations