m-trieu commented on code in PR #31317:
URL: https://github.com/apache/beam/pull/31317#discussion_r1619448152
##########
runners/google-cloud-dataflow-java/worker/src/test/java/org/apache/beam/runners/dataflow/worker/windmill/work/refresh/DispatchedActiveWorkRefresherTest.java:
##########
@@ -106,16 +114,27 @@ private ActiveWorkRefresher createActiveWorkRefresher(
Executors.newSingleThreadScheduledExecutor());
}
- private Work createOldWork(int workIds, Consumer<Work> processWork) {
- return Work.create(
- Windmill.WorkItem.newBuilder()
- .setWorkToken(workIds)
- .setCacheToken(workIds)
- .setKey(ByteString.EMPTY)
- .setShardingKey(workIds)
- .build(),
- DispatchedActiveWorkRefresherTest.A_LONG_TIME_AGO,
- ImmutableList.of(),
+ private ExecutableWork createOldWork(
+ ShardedKey shardedKey, int workIds, Consumer<Work> processWork) {
+ WorkCommitter workCommitter = mock(WorkCommitter.class);
+ doNothing().when(workCommitter).commit(any(Commit.class));
+ WindmillStream.GetDataStream getDataStream =
mock(WindmillStream.GetDataStream.class);
+ when(getDataStream.requestKeyedData(anyString(), any()))
+ .thenReturn(Windmill.KeyedGetDataResponse.getDefaultInstance());
Review Comment:
done
--
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]