-
Notifications
You must be signed in to change notification settings - Fork 701
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
fix: solve the problem of serviceInfo incomparable, to fit the upgrade of grpc-go. #309
Conversation
fix: solve the problem of serviceInfo incomparable, to fit the upgrade of grpc-go.
需要增加一个复现panic的测试用例 |
fix:Reproduce the pannic problem of issue douyu#293
Codecov Report
@@ Coverage Diff @@
## master #309 +/- ##
==========================================
- Coverage 31.74% 31.58% -0.16%
==========================================
Files 93 95 +2
Lines 6528 6588 +60
==========================================
+ Hits 2072 2081 +9
- Misses 4321 4372 +51
Partials 135 135
Continue to review full report at Codecov.
|
需要解决下lint问题 |
fix : update lint version
pkg/server/server_test.go
Outdated
// comparison at runtime results in panic | ||
func TestNotImplementEqual(t *testing.T) { | ||
|
||
defer func() { |
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.
We should use assert.Panics with https://github.com/stretchr/testify
helloworld.UnimplementedGreeterServer | ||
|
||
type Greeter struct{ | ||
helloworld.GreeterServer |
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.
这里还是用helloworld.UnimplementedGreeterServer更好
helloworld.UnimplementedGreeterServer | ||
|
||
type Greeter struct{ | ||
helloworld.GreeterServer |
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.
这里还是用helloworld.UnimplementedGreeterServer更好
@@ -54,7 +54,7 @@ func (eng *Engine) serveGRPC() error { | |||
} | |||
|
|||
type Greeter struct { | |||
helloworld.UnimplementedGreeterServer | |||
helloworld.GreeterServer |
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.
同上
@@ -54,7 +54,7 @@ func (eng *Engine) serveGRPC() error { | |||
} | |||
|
|||
type Greeter struct { | |||
helloworld.UnimplementedGreeterServer | |||
helloworld.GreeterServer |
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.
同上
Describe what this PR does / why we need it
This pr fixes some demos about grpc load balancing based on etcd in example,and it fix one issue.
Does this pull request fix one issue?
Fixes #293
Describe how you did it
Implement the equal method for the serviceInfo structure
Describe how to verify it
This pr opened with a test demo, which can prove my work
Special notes for reviews