-
Notifications
You must be signed in to change notification settings - Fork 753
tests: close gRPC connections after testing #10102
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
Conversation
| } | ||
|
|
||
| // MustNewGrpcClient must create a new PD grpc client. | ||
| func MustNewGrpcClient(re *require.Assertions, addr string) pdpb.PDClient { |
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.
How about adding a new function as close for pdClient, it will close this conn?
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.
Here we just create a gRPC client instead of pd client.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #10102 +/- ##
==========================================
+ Coverage 78.38% 78.45% +0.07%
==========================================
Files 518 518
Lines 69476 69475 -1
==========================================
+ Hits 54456 54510 +54
+ Misses 11066 11034 -32
+ Partials 3954 3931 -23
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
| _, err = stream.Recv() | ||
| if err != nil { | ||
| isCanceled := strings.Contains(err.Error(), "context canceled") | ||
| isEOF := strings.Contains(err.Error(), "EOF") |
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 remove EOF?
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.
no eof error anymore
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bufferflies, lhy1024 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
|
/retest |
What problem does this PR solve?
Issue Number: ref #7969
What is changed and how does it work?
Check List
Tests
Release note