-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for specifying timeouts #715
Conversation
This adds [goreleaser](https://goreleaser.com/) to the repo to enable easy publishing of releases.
@@ -359,6 +359,15 @@ func populateExpectedResponse(testCase *conformancev1.TestCase) error { | |||
} | |||
} | |||
|
|||
// Converts a pointer to a uint32 value into a pointer to an int64. | |||
// If the pointer is nil, function returns nil. | |||
func convertToInt64Ptr(num *uint32) *int64 { |
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.
Not sure if there's a better way to do this.
@@ -140,6 +144,9 @@ message UnaryResponseDefinition { | |||
// Response trailers to send - together with the error if present | |||
repeated Header response_trailers = 4; | |||
|
|||
// Wait this many milliseconds before sending a response message | |||
uint32 response_delay_ms = 6; |
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.
Realized there was no way to specify a response delay for unary responses.
@@ -73,6 +73,21 @@ testCases: | |||
responseTrailers: | |||
- name: x-custom-trailer | |||
value: ["bing","quux"] | |||
- request: |
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.
Bidi's seem to be failing timeouts. Investigating in a separate PR.
This adds support for specifying timeouts and adds unit tests for validating context deadlines. In doing so, it fixes the expectations so that the test library validates servers are returning the received
TimeoutMs
.