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

reuse MockEventDispatcher and NewMockServiceNameMapping in service discovery test #1189

Merged
merged 8 commits into from
May 14, 2021

Conversation

gaoxinge
Copy link

@gaoxinge gaoxinge commented May 8, 2021

What this PR does:

  • 在service discovery的单测中重用MockEventDispatcher和NewMockServiceNameMapping

Special notes for your reviewer:

NONE

Does this PR introduce a user-facing change?:

NONE

@codecov-commenter
Copy link

codecov-commenter commented May 8, 2021

Codecov Report

Merging #1189 (d3b80b5) into 3.0 (968650f) will decrease coverage by 2.96%.
The diff coverage is 53.79%.

❗ Current head d3b80b5 differs from pull request most recent head e4e1894. Consider uploading reports for the commit e4e1894 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##              3.0    #1189      +/-   ##
==========================================
- Coverage   59.53%   56.56%   -2.97%     
==========================================
  Files         259      254       -5     
  Lines       12737    12488     -249     
==========================================
- Hits         7583     7064     -519     
- Misses       4199     4543     +344     
+ Partials      955      881      -74     
Impacted Files Coverage Δ
cluster/cluster_impl/available_cluster.go 100.00% <ø> (ø)
cluster/cluster_impl/broadcast_cluster_invoker.go 76.47% <ø> (ø)
cluster/cluster_impl/failfast_cluster_invoker.go 66.66% <ø> (ø)
cluster/cluster_impl/mock_cluster.go 0.00% <0.00%> (ø)
cluster/loadbalance/random.go 100.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_post_processor.go 0.00% <0.00%> (ø)
common/extension/configurator.go 0.00% <ø> (ø)
... and 220 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 3c16052...e4e1894. Read the comment docs.

@AlexStocks
Copy link
Contributor

@gaoxinge , pls check the following files

./common/extension/event_dispatcher.go:56:			"like import _ github.com/apache/dubbo-go/common/observer/dispatcher ")
./common/extension/registry.go:35:		panic("registry for " + name + " does not exist. please make sure that you have imported the package `github.com/apache/dubbo-go/registry/" + name + "`.")
./common/extension/metadata_remote.go:49:		"remote - github.com/apache/dubbo-go/metadata/remote/impl"))
./common/extension/metadata_service_proxy_factory.go:48:		"local - github.com/apache/dubbo-go/metadata/service/inmemory, \n", name))
./common/extension/metadata_service.go:53:		"local - github.com/apache/dubbo-go/metadata/service/inmemory, "))
./contributing.md:62:  "github.com/apache/dubbo-go/common"
./protocol/dubbo3/protoc-gen-dubbo3/go.mod:1:module github.com/apache/dubbo-go/protocol/dubbo3/protoc-gen-dubbo3
./protocol/dubbo3/protoc-gen-dubbo3/main.go:32:	_ "github.com/apache/dubbo-go/protocol/dubbo3/protoc-gen-dubbo3/plugin/dubbo3"
./protocol/invoker.go:44://go:generate mockgen -source invoker.go -destination mock/mock_invoker.go  -self_package github.com/apache/dubbo-go/protocol/mock --package mock  Invoker
./test/integrate/dubbo/go-client/go.mod:1:module github.com/apache/dubbo-go/test/integrate/dubbo/go-client
./test/integrate/dubbo/go-server/go.mod:1:module github.com/apache/dubbo-go/test/integrate/dubbo/go-server
./test/integrate/dubbo/go-server/go.mod:9:	// RUN test ${PR_ORIGIN_REPO} && go mod edit -replace=dubbo.apache.org/dubbo-go/v3=github.com/${PR_ORIGIN_REPO}@${PR_ORIGIN_COMMITID} || go get -u dubbo.apache.org/dubbo-go/v3@develop
./tools/cli/go.mod:1:module github.com/apache/dubbo-go/tools/cli
./tools/cli/example/server/go.sum:117:github.com/apache/dubbo-go v1.5.1 h1:9bcGOkek0+x+zqtvykKpuOwkoJfMef0zNxsyPbWOafY=
./tools/cli/example/server/go.sum:118:github.com/apache/dubbo-go v1.5.1/go.mod h1:lxwgtF+27mSFQsSrBLaVbdQpwCp+pBN/mHP4w4/N2Qc=
./tools/cli/example/server/go.sum:119:github.com/apache/dubbo-go v1.5.4 h1:kRVw2p6Fqk5PlJGHeb8IVFg5AuBJFPFvCvRm7/i3Qco=
./tools/cli/example/server/go.sum:120:github.com/apache/dubbo-go v1.5.4/go.mod h1:QIqjEvIbgmuk1mESsQSsTsFngHlYLGAmRN9gXN+YJq4=
./tools/cli/protocol/dubbo/dubbo_protocol.go:33:	"github.com/apache/dubbo-go/tools/cli/common"
./tools/cli/protocol/dubbo/dubbo_protocol.go:34:	"github.com/apache/dubbo-go/tools/cli/protocol"
./tools/cli/common/protocol.go:21:	"github.com/apache/dubbo-go/tools/cli/protocol"
./tools/cli/json_register/json_register.go:32:	"github.com/apache/dubbo-go/tools/cli/common"
./tools/cli/client/client.go:33:	"github.com/apache/dubbo-go/tools/cli/common"
./tools/cli/client/client.go:34:	"github.com/apache/dubbo-go/tools/cli/protocol"
./tools/cli/client/client.go:35:	_ "github.com/apache/dubbo-go/tools/cli/protocol/dubbo"
./tools/cli/main.go:26:	"github.com/apache/dubbo-go/tools/cli/client"
./tools/cli/main.go:27:	"github.com/apache/dubbo-go/tools/cli/json_register"

@AlexStocks AlexStocks requested review from flycash and wongoo May 13, 2021 14:55
Copy link
Contributor

@zhaoyunxing92 zhaoyunxing92 left a comment

Choose a reason for hiding this comment

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

approved these changes

@AlexStocks AlexStocks merged commit f533a1d into apache:3.0 May 14, 2021
@gaoxinge gaoxinge deleted the reuse branch May 15, 2021 03:00
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.

5 participants