Skip to content
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

Merged
merged 3 commits into from
Jun 3, 2020

Conversation

Patrick0308
Copy link
Contributor

Improve code coverage of zookeeper config center

relates #518

@codecov-commenter
Copy link

Codecov Report

Merging #549 into develop will decrease coverage by 0.17%.
The diff coverage is 61.94%.

Impacted file tree graph

@@             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     
Impacted Files Coverage Δ
cluster/cluster_impl/base_cluster_invoker.go 62.31% <ø> (-10.15%) ⬇️
cluster/directory/base_directory.go 65.90% <0.00%> (ø)
cluster/loadbalance/consistent_hash.go 90.32% <ø> (-0.86%) ⬇️
common/config/environment.go 52.38% <ø> (ø)
common/extension/auth.go 0.00% <ø> (ø)
common/extension/cluster.go 0.00% <ø> (ø)
common/extension/config_center.go 0.00% <ø> (ø)
common/extension/config_center_factory.go 0.00% <ø> (ø)
common/extension/config_reader.go 0.00% <ø> (ø)
common/extension/configurator.go 0.00% <ø> (ø)
... and 112 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7d4f1ed...4a0f73e. Read the comment docs.

Copy link
Contributor

@hxmhlt hxmhlt left a 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 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

zookeeper.NewMockZookeeperClient may delete?

Copy link
Contributor Author

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)

Copy link
Contributor

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 ?

Copy link
Contributor Author

@Patrick0308 Patrick0308 Jun 2, 2020

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%.

@Patrick0308 Patrick0308 merged commit 6eca640 into apache:develop Jun 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants