Skip to content

Commit

Permalink
fix travis test
Browse files Browse the repository at this point in the history
  • Loading branch information
YifeiZhuang committed Dec 14, 2020
1 parent 1fe3bce commit eb18861
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/src/main/java/io/grpc/internal/DelayedStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ protected boolean isStreamTransferCompleted() {

protected void awaitStreamTransferCompletion() {
// Wait until accepted RPCs transfer to the real stream so that we can properly cancel or
// shutdown. Not waiting for transfer completion may cause pending calls orphaned. #636.
// shutdown. Not waiting for transfer completion may cause pending calls orphaned. #6283.
boolean delegationComplete;
try {
delegationComplete = realStreamStarted.await(5, TimeUnit.SECONDS);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -720,15 +720,14 @@ public void run() {
}
};
processThread.start();
assertEquals(1, delayedTransport.getPendingStreamsCount());//stream2
assertEquals(1, delayedTransport.getUncommittedStreamsCount());//stream1
barrierSignal.await(5, TimeUnit.SECONDS);
assertEquals(1, barrier.getNumberWaiting());
delayedTransport.shutdownNow(SHUTDOWN_STATUS);
assertFalse(delayedTransport.hasPendingStreams());
assertFalse(delayedTransport.hasUncommittedStreams());
assertFalse(Thread.interrupted());
barrier.await(5, TimeUnit.SECONDS);
processThread.join(5000);
assertSame(mockRealStream, stream1.getRealStream());
assertTrue(stream2.getRealStream() instanceof NoopClientStream);
verify(mockRealStream).start(any(ClientStreamListener.class));
Expand Down

0 comments on commit eb18861

Please sign in to comment.