-
Notifications
You must be signed in to change notification settings - Fork 929
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
Improve code coverage of zookeeper config center #549
Improve code coverage of zookeeper config center #549
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #549 +/- ##
===========================================
- Coverage 66.92% 66.74% -0.18%
===========================================
Files 174 184 +10
Lines 9261 9693 +432
===========================================
+ Hits 6198 6470 +272
- Misses 2455 2581 +126
- Partials 608 642 +34
Continue to review full report at Codecov.
|
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.
The total coverage is lower. May be some case in previous code not be coveraged.
err error | ||
) | ||
tc, c.client, _, err = zookeeper.NewMockZookeeperClient("test", 15*time.Second, opts...) | ||
if err != nil { |
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.
zookeeper.NewMockZookeeperClient may delete?
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.
zookeeper.NewMockZookeeperClient
be used in other place.
} | ||
c.wg.Add(1) | ||
go zookeeper.HandleClientRestart(c) | ||
|
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.
Is zookeeper.HandleClientRestart(c) coveraged ?
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.
Yeah, it's be covered. I don't know why this coverage be smaller. In my computer, cluster/cluster_impl/base_cluster_invoker.go
coverage is bigger than 80%, but here the coverage is 62.31%.
Improve code coverage of zookeeper config center
relates #518