use of org.apache.beam.runners.dataflow.worker.WorkerCustomSources.BoundedSourceSplit in project beam by apache.
the class WorkItemStatusClientTest method populateSplitResultCustomReader.
@Test
public void populateSplitResultCustomReader() throws Exception {
WorkItemStatus status = new WorkItemStatus();
statusClient.setWorker(worker, executionContext);
BoundedSource<Integer> primary = new DummyBoundedSource(5);
BoundedSource<Integer> residual = new DummyBoundedSource(10);
BoundedSourceSplit<Integer> split = new BoundedSourceSplit<>(primary, residual);
statusClient.populateSplitResult(status, split);
assertThat(status.getDynamicSourceSplit(), equalTo(WorkerCustomSources.toSourceSplit(split)));
assertThat(status.getStopPosition(), nullValue());
}
Aggregations