You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2021/04/25 02:18:19 UTC

[GitHub] [servicecomb-java-chassis] AngLi2 commented on a change in pull request #2358: SCB-2256 The address of the config center of the service startup log is printed automatically according to the component type

AngLi2 commented on a change in pull request #2358:
URL: https://github.com/apache/servicecomb-java-chassis/pull/2358#discussion_r619736299



##########
File path: deployment/src/test/java/org/apache/servicecomb/deployment/CustomDeploymentProvider.java
##########
@@ -17,23 +17,32 @@
 
 package org.apache.servicecomb.deployment;
 
+import com.google.common.annotations.VisibleForTesting;
+import org.apache.commons.configuration.AbstractConfiguration;
+import org.apache.servicecomb.config.ConfigUtil;
+
 import java.util.Arrays;
 
 public class CustomDeploymentProvider implements DeploymentProvider {
+  private static AbstractConfiguration configuration = ConfigUtil.createLocalConfig();
+
   @Override
   public int getOrder() {
     return 0;
   }
 
   @Override
   public SystemBootstrapInfo getSystemBootStrapInfo(String systemKey) {
-    switch (systemKey) {
-      case DeploymentProvider.SYSTEM_KEY_CONFIG_CENTER:
-        SystemBootstrapInfo cc = new SystemBootstrapInfo();
-        cc.setAccessURL(Arrays.asList("http://lcalhost/custom"));
-        return cc;
-      default:
-        return null;
+    if (systemKey.contentEquals("TestCenter")) {
+      SystemBootstrapInfo cc = new SystemBootstrapInfo();
+      cc.setAccessURL(Arrays.asList("http://lcalhost/custom"));

Review comment:
       typo




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org