Add UT for actions
[holmes/common.git] / holmes-actions / src / main / java / org / openo / holmes / common / utils / MSBRegisterUtil.java
index e18a15c..91e28a6 100644 (file)
@@ -19,7 +19,6 @@ package org.openo.holmes.common.utils;
 import com.eclipsesource.jaxrs.consumer.ConsumerFactory;\r
 import java.io.IOException;\r
 import lombok.extern.slf4j.Slf4j;\r
-import org.glassfish.jersey.client.ClientConfig;\r
 import org.jvnet.hk2.annotations.Service;\r
 import org.openo.holmes.common.api.entity.ServiceRegisterEntity;\r
 import org.openo.holmes.common.config.MicroServiceConfig;\r
@@ -49,12 +48,11 @@ public class MSBRegisterUtil {
     }\r
 \r
     private boolean inner_register(ServiceRegisterEntity entity) {\r
-        ClientConfig config = new ClientConfig();\r
         try {\r
             log.info("msbServerAddr:" + MicroServiceConfig.getMsbServerAddr());\r
             log.info("entity:" + entity);\r
             MicroserviceBusRest resourceserviceproxy = ConsumerFactory.createConsumer(\r
-                    MicroServiceConfig.getMsbServerAddr(), config, MicroserviceBusRest.class);\r
+                    MicroServiceConfig.getMsbServerAddr(), MicroserviceBusRest.class);\r
             resourceserviceproxy.registerServce("false", entity);\r
         } catch (Exception error) {\r
             log.error("microservice register failed!" + error.getMessage());\r