-
Notifications
You must be signed in to change notification settings - Fork 158
Make getResult methods to throw TimeoutException instead of raw gRPC DEADLINE_EXCEEDED #1209
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
a67716e
to
40685f8
Compare
8ae4a9d
to
dde1bdc
Compare
temporal-sdk/src/main/java/io/temporal/internal/sync/WorkflowStubImpl.java
Outdated
Show resolved
Hide resolved
temporal-sdk/src/main/java/io/temporal/internal/client/WorkflowClientLongPollAsyncHelper.java
Show resolved
Hide resolved
temporal-serviceclient/src/main/java/io/temporal/internal/retryer/GrpcRetryerUtils.java
Outdated
Show resolved
Hide resolved
|
||
/** | ||
* These tests are intentionally running longer than a minute to cover a situation when getResult | ||
* calls needs to survive a server timeout on a long poll of 60 seconds to get the result of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason not to just crank down the poll timeout a bit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to test a situation when the server responds with an empty result, not when we hit a long poll timeout. And for that, I have to get over 20 seconds (this is the default behavior right now, the server cuts history long polls in 20 seconds and returns an empty history). Or modify the settings of our server, which I don't want to abuse.
a8f0a33
to
822a8e5
Compare
…DEADLINE_EXCEEDED getResultAsync now respects the timeout Issue temporalio#1177 Issue temporalio#988
d4bdf45
to
986329d
Compare
…DEADLINE_EXCEEDED getResultAsync now respects the timeout Issue temporalio#1177 Issue temporalio#988
What was changed
Make getResult methods to throw
TimeoutException
as the method contract states instead of raw gRPC DEADLINE_EXCEEDED.getResultAsync now respects the timeout.
Unit tests are added that are covering different kinds of timeouts and retries of the long poll.
Closes #1177
Closes #988
Closes #1203