test: add timeout_on_sleeping_server interop test #1568
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
I'm dealing with a conformance test that assumes that when you set (and hit) a timeout in a gRPC client, the status code you see is
DEADLINE_EXCEEDED
. Currently, when setting a timeout (say by usingrequest.set_timeout
), I sometimes see aCANCELLED
code instead.As far as I can tell, the gRPC interop test
timeout_on_sleeping_server
checks this and asserts that the status code isDEADLINE_EXCEEDED
. This part of the gRPC spec isn't particularly clear, but it looks likegrpc-go
sometimes convertsCANCELLED
intoDEADLINE_EXCEEDED
(see here).This PR adds this particular test to the interop suite, which I believe is equivalent to this on in grpc-go here.
Solution
I don't know how to solve this. It appears to me like the test case is flaky. I believe this is due to the fact that sometimes, the server is responding with
DEADLINE_EXCEED
and other times, the error is produced internally in the client asCANCELLED
.I'm hoping that by adding the test case, this can be nailed down.