nanjiek commented on code in PR #3210:
URL: https://github.com/apache/dubbo-go/pull/3210#discussion_r2793332814


##########
config_center/apollo/impl_test.go:
##########
@@ -182,19 +187,16 @@ func initMockApollo(t *testing.T) *apolloConfiguration {
        // Register the YAML format parser with concurrent safety.
        extension.AddFormatParser(constant.YAML, &Parser{})
        extension.AddFormatParser(constant.YML, &Parser{})
-       c := &config.RootConfig{ConfigCenter: &config.CenterConfig{
-               Protocol:  "apollo",
-               Address:   "localhost:8080",
-               AppID:     "testApplication_yang",
-               Cluster:   "dev",
-               Namespace: "mockDubbogo.yaml",
-               Params: map[string]string{
-                       "config-center.isBackupConfig": "false",
-               },
-       }}
+
+       params := url.Values{}
+       params.Set("config-center.namespace", "mockDubbogo.yaml")
+       params.Set("config-center.appId", "testApplication_yang")
+       params.Set("config-center.cluster", "dev")
+       params.Set("config-center.isBackupConfig", "false")
+

Review Comment:
   使用constant/key里面的常量,替代“config-center.namespace”。
   ```
   ```
   ```suggestion
           params := url.Values{}
           params.Set(constant.ConfigNamespaceKey, "mockDubbogo.yaml")
           params.Set(constant.ConfigAppIDKey, "testApplication_yang")
           params.Set(constant.ConfigClusterKey, "dev")
           params.Set(constant.ConfigBackupConfigKey, "false")
     ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to