mirror of https://github.com/grpc/grpc-java.git
Revert "interop-testing: Observe flow control in TestServiceImpl"
This reverts commit e795f14bed
. It breaks some of
our internal tests. At the very least the cast fails because we are reusing the
service for something without going through the normal stub. There may also
have been a test hang, but it'd take more effort to figure out.
This commit is contained in:
parent
c92c9e71bb
commit
675b37a027
|
@ -228,7 +228,7 @@ public class TestServiceImpl extends TestServiceGrpc.TestServiceImplBase {
|
|||
private class ResponseDispatcher {
|
||||
private final Chunk completionChunk = new Chunk(0, 0, 0);
|
||||
private final Queue<Chunk> chunks;
|
||||
private final ServerCallStreamObserver<StreamingOutputCallResponse> responseStream;
|
||||
private final StreamObserver<StreamingOutputCallResponse> responseStream;
|
||||
private boolean scheduled;
|
||||
@GuardedBy("this") private boolean cancelled;
|
||||
private Throwable failure;
|
||||
|
@ -268,12 +268,7 @@ public class TestServiceImpl extends TestServiceGrpc.TestServiceImplBase {
|
|||
*/
|
||||
public ResponseDispatcher(StreamObserver<StreamingOutputCallResponse> responseStream) {
|
||||
this.chunks = Queues.newLinkedBlockingQueue();
|
||||
this.responseStream = (ServerCallStreamObserver<StreamingOutputCallResponse>) responseStream;
|
||||
this.responseStream.setOnReadyHandler(new Runnable() {
|
||||
@Override public void run() {
|
||||
scheduleNextChunk();
|
||||
}
|
||||
});
|
||||
this.responseStream = responseStream;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -354,11 +349,6 @@ public class TestServiceImpl extends TestServiceGrpc.TestServiceImplBase {
|
|||
return;
|
||||
}
|
||||
|
||||
if (chunks.peek() != completionChunk && !responseStream.isReady()) {
|
||||
// Wait for the onReady handler to be called.
|
||||
return;
|
||||
}
|
||||
|
||||
// Schedule the next response chunk if there is one.
|
||||
Chunk nextChunk = chunks.peek();
|
||||
if (nextChunk != null) {
|
||||
|
|
Loading…
Reference in New Issue