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

Fix:nacos client reuse #1633

Merged
merged 16 commits into from
Feb 1, 2022
Merged
Prev Previous commit
Next Next commit
fix:测试用例
  • Loading branch information
zhaoyunxing92 committed Jan 18, 2022
commit 0951444ba4b596d2ba7a237996ee1601d417de5e
4 changes: 3 additions & 1 deletion registry/nacos/service_discovery_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ import (
const testName = "test"

func TestNewNacosServiceDiscovery(t *testing.T) {
url, _ := common.NewURL("dubbo://127.0.0.1:8848")
url, _ := common.NewURL("dubbo://127.0.0.1:8848",
common.WithParamsValue(constant.ClientNameKey, "nacos-client"))
sd, err := newNacosServiceDiscovery(url)
assert.Nil(t, err)
err = sd.Destroy()
Expand Down Expand Up @@ -122,6 +123,7 @@ func newMockNacosServiceDiscovery(url *common.URL) (registry.ServiceDiscovery, e
common.WithParamsValue(constant.NacosGroupKey, url.GetParam(constant.RegistryGroupKey, defaultGroup)),
common.WithParamsValue(constant.NacosUsername, url.Username),
common.WithParamsValue(constant.NacosPassword, url.Password),
common.WithParamsValue(constant.ClientNameKey, "nacos-client"),
common.WithParamsValue(constant.NacosNamespaceID, url.GetParam(constant.RegistryNamespaceKey, "")))
discoveryURL.Location = url.Location
discoveryURL.Username = url.Username
Expand Down