Skip to content
Permalink
Browse files
fix(generator): delay removing streaming response until used (#145)
PiperOrigin-RevId: 308294748

Source-Author: Google APIs <noreply@google.com>
Source-Date: Fri Apr 24 11:44:16 2020 -0700
Source-Repo: googleapis/googleapis
Source-Sha: 28e76243c23cc282efbb288cb558c174e3e5e9ee
Source-Link: googleapis/googleapis@28e7624
  • Loading branch information
yoshi-automation committed Apr 25, 2020
1 parent a659059 commit 280c8e814e430d9f52d38d73eada14a5ffb10f1b
Showing with 5 additions and 4 deletions.
  1. +2 −1 .../java/com/google/cloud/videointelligence/v1p3beta1/MockStreamingVideoIntelligenceServiceImpl.java
  2. +3 −3 synth.metadata
@@ -60,11 +60,12 @@ public void reset() {
@Override
public StreamObserver<StreamingAnnotateVideoRequest> streamingAnnotateVideo(
final StreamObserver<StreamingAnnotateVideoResponse> responseObserver) {
final Object response = responses.remove();
StreamObserver<StreamingAnnotateVideoRequest> requestObserver =
new StreamObserver<StreamingAnnotateVideoRequest>() {
@Override
public void onNext(StreamingAnnotateVideoRequest value) {
requests.add(value);
final Object response = responses.remove();
if (response instanceof StreamingAnnotateVideoResponse) {
responseObserver.onNext((StreamingAnnotateVideoResponse) response);
} else if (response instanceof Exception) {
@@ -4,15 +4,15 @@
"git": {
"name": ".",
"remote": "https://github.com/googleapis/java-video-intelligence.git",
"sha": "1827e5dce4d41447ea50302e121047e767d12aed"
"sha": "a65905927826c82e7bdcca025e18021259e4dd1e"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "96c0db42dbcb3bb0116cfa55c054dd139ffb3912",
"internalRef": "305779873"
"sha": "28e76243c23cc282efbb288cb558c174e3e5e9ee",
"internalRef": "308294748"
}
},
{

0 comments on commit 280c8e8

Please sign in to comment.