use of org.apache.beam.runners.dataflow.worker.util.common.worker.NativeReader.Progress in project beam by apache.
the class WorkItemStatusClientTest method populateProgress.
@Test
public void populateProgress() throws Exception {
WorkItemStatus status = new WorkItemStatus();
Progress progress = cloudProgressToReaderProgress(ReaderTestUtils.approximateProgressAtIndex(42L));
when(worker.getWorkerProgress()).thenReturn(progress);
statusClient.setWorker(worker, executionContext);
statusClient.populateProgress(status);
assertThat(status.getReportedProgress(), equalTo(ReaderTestUtils.approximateProgressAtIndex(42L)));
}
Aggregations