m-trieu commented on code in PR #30312:
URL: https://github.com/apache/beam/pull/30312#discussion_r1518273946
##########
runners/google-cloud-dataflow-java/worker/src/test/java/org/apache/beam/runners/dataflow/worker/FakeWindmillServer.java:
##########
@@ -376,7 +395,23 @@ public boolean commitWorkItem(
droppedStreamingCommits.put(request.getWorkToken(), onDone);
} else {
commitsReceived.put(request.getWorkToken(), request);
- onDone.accept(Windmill.CommitStatus.OK);
+ if (useInjectableStreamingCommitResponses) {
+ StreamingCommitWorkRequest.Builder streamingRequestBuilder =
+ StreamingCommitWorkRequest.newBuilder();
+ streamingRequestBuilder.addCommitChunk(
+ Windmill.StreamingCommitRequestChunk.newBuilder()
+ .setComputationId(computation)
+ .setRequestId(new Random().nextLong())
+ .setShardingKey(request.getShardingKey())
+ .setSerializedWorkItemCommit(request.toByteString())
+ .setRemainingBytesForWorkItem(0)
+ .build());
+ StreamingCommitResponse response =
+
streamingCommitsToOffer.getOrDefault(streamingRequestBuilder.build());
Review Comment:
done using map instead of response queue
##########
runners/google-cloud-dataflow-java/worker/src/test/java/org/apache/beam/runners/dataflow/worker/FakeWindmillServer.java:
##########
@@ -122,6 +131,11 @@ public void setDropStreamingCommits(boolean
dropStreamingCommits) {
this.dropStreamingCommits = dropStreamingCommits;
}
+ public void setUseInjectableStreamingCommitResponses(
Review Comment:
removed
--
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]