use of org.apache.beam.runners.dataflow.worker.SourceTranslationUtils.DataflowReaderPosition in project beam by apache.
the class WorkItemStatusClientTest method populateSplitResultNativeReader.
@Test
public void populateSplitResultNativeReader() throws Exception {
WorkItemStatus status = new WorkItemStatus();
statusClient.setWorker(worker, executionContext);
Position position = ReaderTestUtils.positionAtIndex(42L);
DynamicSplitResult result = new NativeReader.DynamicSplitResultWithPosition(new DataflowReaderPosition(position));
statusClient.populateSplitResult(status, result);
assertThat(status.getStopPosition(), equalTo(position));
assertThat(status.getDynamicSourceSplit(), nullValue());
}
Aggregations