-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
client: fix FailOnNonTempDialError and add a test for it #2276
Conversation
virtuald
commented
Aug 25, 2018
- Fixes FailOnNonTempDialError doesn't fail #2266
Thank you for your pull request. Before we can look at your contribution, we need to ensure all contributors are covered by a Contributor License Agreement. After the following items are addressed, please respond with a new comment here, and the automated system will re-verify.
Regards, |
Added CLA. |
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.
Looks great, thanks for putting this fix together. One minor comment on the test, otherwise 👍 👍
clientconn_test.go
Outdated
|
||
func TestDialContextFailFast(t *testing.T) { | ||
defer leakcheck.Check(t) | ||
ctx := context.Background() |
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.
Please make this timeout eventually so the test won't hang forever if it breaks. E.g.
ctx := context.WithTimeout(context.Background(), 10*time.Second)
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.
Why don't any of the other tests do that then?
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'm fixing the ones I see when I run into them.
Also, thinking about it, should a note be added to the documentation that FailOnNonTempDialError is only useful if WithBlock is also used? It's not immediately clear to me that it does anything if not using WithBlock... |
222a6be
to
0beef9e
Compare
That would be great, thanks. The whole idea of a blocking |
0beef9e
to
22afde1
Compare
Added documentation note also. |
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.
Thanks!