-
Notifications
You must be signed in to change notification settings - Fork 78
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 test case for internal/errors/grpc.go #903
Conversation
[CHATOPS:HELP] ChatOps commands.
|
internal/errors/grpc.go
Outdated
@@ -33,19 +33,24 @@ var ( | |||
return Errorf("invalid gRPC client connection to %s", addr) | |||
} | |||
|
|||
// ErrGRPCLookupIPAddrNotFound represents a function to generate an error that the vald internal gRPC couldn't find ip address. |
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.
[golangci] reported by reviewdog 🐶
line is 128 characters (lll)
Codecov Report
@@ Coverage Diff @@
## master #903 +/- ##
==========================================
+ Coverage 19.16% 19.17% +0.01%
==========================================
Files 423 422 -1
Lines 19602 19548 -54
==========================================
- Hits 3756 3749 -7
+ Misses 15628 15590 -38
+ Partials 218 209 -9
Continue to review full report at Codecov.
|
internal/errors/grpc.go
Outdated
@@ -19,33 +19,39 @@ package errors | |||
|
|||
var ( | |||
|
|||
// gRPC | |||
|
|||
// ErrgRPCClientConnectionClose represents a function to generate an error that the gRPC connection couldn't close. | |||
ErrgRPCClientConnectionClose = func(name string, err error) error { |
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 think it should be ErrGRPCClientConnectionClose
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 could not understand your opinion ...
I'm sorry I don't understand.:bow:
so could you please tell me about this more clearly?? 🙇
Does this mean I need to modify the function name? 🤔
I think your opinion's function name(ErrgRPCClientConnectionClose
) and the function name (ErrgRPCClientConnectionClose
) in the original code are the same 🤔
If I made a mistake, I am sorry
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.
sorry it was my mistake. I have modified the comment above.
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.
thank you. 🙏
But I can not see the modified your comment above...:thinking:
It may not have been modified 🤔
so could you please re-modify it ?? 🙇
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.
Sorry I should describe here.
Here is the suggestion.
ErrgRPCClientConnectionClose = func(name string, err error) error { | |
ErrGRPCClientConnectionClose = func(name string, err error) error { |
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.
thank you. I get it 👍
I will fix it soon 🙏
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.
Does this change affect current code?
do you already check?
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.
@vankichi
thank you for your comment.
Does this change affect current code?
I think this change does not affect to current code. 🤔
do you already check?
Yes, I did.
I searched for a usage points before, but I couldn't find it.
The following is the searched result 🙇
https://github.com/vdaas/vald/search?q=ErrgRPCClientConnectionClose
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.
@hlts2 leave comment
type args struct { | ||
addr string | ||
host string | ||
port uint16 |
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 thinks it'd be better add case with boundary value of uint16
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.
Thank you for your comment. 🙇
I agree with you. 👍
I selected 0
and maxUint16
and 8080
as port value. 🤔
Originally, maxUint16 + 1
, -1
should be also included as boundary value, but it could not be included due to a compile error. ...
So could you tell me which value should be selected as the boundary value of uint16?
sorry 🙏
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.
For example, uint16 range is from 0
to maxUint16
🤔
so, is the boundary value below?
0
1
maxUint16-1
maxUint16
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.
yap
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.
plz refer to https://golang.org/pkg/math/#pkg-constants
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.
@vankichi
thank you
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.
LGTM
/rebase |
[REBASE] Rebase triggered by kevindiu for branch: test/internal/add-errors-grpc-test |
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
Co-authored-by: Kiichiro YUKAWA <kyukawa315@gmail.com>
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
b793f54
to
aa50a19
Compare
[FORMAT] Updating license headers and formatting go codes triggered by kevindiu. |
Signed-off-by: vdaas-ci <ci@vdaas.org>
/rebase |
[REBASE] Rebase triggered by kevindiu for branch: test/internal/add-errors-grpc-test |
[FORMAT] Updating license headers and formatting go codes triggered by kevindiu. |
Description:
I added the test cases for internal/errors/grpc.go and comments.
And I modified the function name based on kevin-san's comment.
grammar check passed
Related Issue:
How Has This Been Tested?:
Environment:
Types of changes:
Changes to Core Features:
Checklist: