scwhittle commented on code in PR #31784:
URL: https://github.com/apache/beam/pull/31784#discussion_r1681952082


##########
runners/google-cloud-dataflow-java/worker/src/test/java/org/apache/beam/runners/dataflow/worker/WorkerCustomSourcesTest.java:
##########
@@ -197,13 +199,26 @@ private static Work createMockWork(Windmill.WorkItem 
workItem, Watermarks waterm
         workItem,
         watermarks,
         Work.createProcessingContext(
-            COMPUTATION_ID,
-            (a, b) -> Windmill.KeyedGetDataResponse.getDefaultInstance(),
-            ignored -> {}),
+            COMPUTATION_ID, createMockGetDataClient(), ignored -> {}, 
mock(HeartbeatSender.class)),
         Instant::now,
         Collections.emptyList());
   }
 
+  private static GetDataClient createMockGetDataClient() {

Review Comment:
   why does mock(GetDataClient) not work? 
   ditto for other tests
   
   if it doesn't for some reason, can we have a shared factory for this for 
tests?



##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/streaming/Work.java:
##########
@@ -147,16 +150,25 @@ private static LatencyAttribution.Builder 
createLatencyAttributionWithActiveLate
     return latencyAttribution;
   }
 
+  public RefreshableWork refreshableView() {

Review Comment:
   can we remove this? can it just auto-cast? or in the case where perhaps it 
isn't for streams just do it via a cast there?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to