You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2020/01/17 02:37:44 UTC

[dubbo-go] branch develop updated: fix zookeeper config center namespace default value invalid

This is an automated email from the ASF dual-hosted git repository.

alexstocks pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/dubbo-go.git


The following commit(s) were added to refs/heads/develop by this push:
     new 2c5a4f6  fix zookeeper config center namespace default value invalid
     new cd37e52  Merge pull request #326 from zouyx/feature/fixConfigCenter
2c5a4f6 is described below

commit 2c5a4f608cfb44415a3bd38d9d164ed51fb04873
Author: Joe Zou <yi...@gmail.com>
AuthorDate: Thu Jan 16 22:21:35 2020 +0800

    fix zookeeper config center namespace default value invalid
---
 config/config_center_config.go    | 2 +-
 config_center/apollo/impl.go      | 2 +-
 config_center/apollo/impl_test.go | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/config/config_center_config.go b/config/config_center_config.go
index 013d239..aee9ae8 100644
--- a/config/config_center_config.go
+++ b/config/config_center_config.go
@@ -40,7 +40,7 @@ type ConfigCenterConfig struct {
 	Username      string `yaml:"username" json:"username,omitempty"`
 	Password      string `yaml:"password" json:"password,omitempty"`
 	ConfigFile    string `default:"dubbo.properties" yaml:"config_file"  json:"config_file,omitempty"`
-	Namespace     string `default:"dubbo.properties" yaml:"namespace"  json:"namespace,omitempty"`
+	Namespace     string `default:"dubbo" yaml:"namespace"  json:"namespace,omitempty"`
 	AppConfigFile string `default:"dubbo.properties" yaml:"app_config_file"  json:"app_config_file,omitempty"`
 	AppId         string `default:"dubbo" yaml:"app_id"  json:"app_id,omitempty"`
 	TimeoutStr    string `yaml:"timeout"  json:"timeout,omitempty"`
diff --git a/config_center/apollo/impl.go b/config_center/apollo/impl.go
index ed46d4f..f72f988 100644
--- a/config_center/apollo/impl.go
+++ b/config_center/apollo/impl.go
@@ -58,7 +58,7 @@ func newApolloConfiguration(url *common.URL) (*apolloConfiguration, error) {
 	configCluster := url.GetParam(constant.CONFIG_CLUSTER_KEY, "")
 
 	appId := url.GetParam(constant.CONFIG_APP_ID_KEY, "")
-	namespaces := url.GetParam(constant.CONFIG_NAMESPACE_KEY, getProperties(DEFAULT_GROUP))
+	namespaces := getProperties(url.GetParam(constant.CONFIG_NAMESPACE_KEY, DEFAULT_GROUP))
 	c.appConf = &agollo.AppConfig{
 		AppId:         appId,
 		Cluster:       configCluster,
diff --git a/config_center/apollo/impl_test.go b/config_center/apollo/impl_test.go
index 2a891a2..84e2b28 100644
--- a/config_center/apollo/impl_test.go
+++ b/config_center/apollo/impl_test.go
@@ -192,7 +192,7 @@ func initMockApollo(t *testing.T) *apolloConfiguration {
 		Address:   "106.12.25.204:8080",
 		AppId:     "testApplication_yang",
 		Cluster:   "dev",
-		Namespace: "mockDubbog.properties",
+		Namespace: "mockDubbog",
 	}}
 	apollo := initApollo()
 	apolloUrl := strings.ReplaceAll(apollo.URL, "http", "apollo")