Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion core/src/main/java/io/grpc/internal/RetriableStream.java

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to add a test to cover this case?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out that due to mocks it is difficult.

Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,10 @@ public void run() {
}
}
if (retryFuture != null) {
retryFuture.cancel(false);
boolean cancelled = retryFuture.cancel(false);
Comment thread
sergiitk marked this conversation as resolved.
if (cancelled) {
inFlightSubStreams.decrementAndGet();
}
}
if (hedgingFuture != null) {
hedgingFuture.cancel(false);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it looks hedging also has the same problem.
A UT would be really helpful in either retry or hedging cases.

Expand Down