-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix flaky
TestStreamForServer
test (#627)
This test was flaky due to unexpected cases where calling `Send(nil)` to send request headers could return a non-nil error, even though the server did not actually send back an error. If the handler immediately returned without accepting any messages, the end-of-stream could arrive quickly enough that the call to `Send` would notice and return `io.EOF`. But since the call to `Send` was intended to initiate the request and the server did not actually return any error, this is confusing to observe on the client. So now a call to `Send(nil)` that initiates the call will return a nil error. And any error (including EOF) already received from the server will be returned by the next call to `Send` or `Receive`.
- Loading branch information
1 parent
67dceff
commit 1e3c4e7
Showing
2 changed files
with
28 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters