use of org.apache.flink.api.connector.source.SourceEvent in project flink by apache.
the class SourceOperatorTest method testHandleAddSourceEvent.
@Test
public void testHandleAddSourceEvent() throws Exception {
operator.initializeState(context.createStateContext());
operator.open();
SourceEvent event = new SourceEvent() {
};
operator.handleOperatorEvent(new SourceEventWrapper(event));
// The source reader should have been assigned two splits.
assertEquals(Collections.singletonList(event), mockSourceReader.getReceivedSourceEvents());
}
Aggregations