}
private MicroServiceInfo createMicroServiceInfo() {
- String[] serviceAddrInfo = MicroServiceConfig.getServiceAddrInfo();
+ String[] serviceAddrInfo = MicroServiceConfig.getMicroServiceIpAndPort();
MicroServiceInfo msinfo = new MicroServiceInfo();
msinfo.setServiceName("holmes-rule-mgmt");
msinfo.setVersion("v1");
protected Response delete(String packageName) throws IOException {\r
Client client = createClient();\r
WebTarget webTarget = client\r
- .target(MicroServiceConfig.getMsbServerAddr() + RuleMgtConstant.ENGINE_PATH + "/" + packageName);\r
+ .target(MicroServiceConfig.getMsbServerAddrWithHttpPrefix() + RuleMgtConstant.ENGINE_PATH + "/" + packageName);\r
return webTarget.request(MediaType.APPLICATION_JSON).delete();\r
}\r
\r
Client client = createClient();\r
ObjectMapper mapper = new ObjectMapper();\r
String content = mapper.writeValueAsString(correlationCheckRule4Engine);\r
- WebTarget webTarget = client.target(MicroServiceConfig.getMsbServerAddr() + RuleMgtConstant.ENGINE_PATH);\r
+ WebTarget webTarget = client.target(MicroServiceConfig.getMsbServerAddrWithHttpPrefix() + RuleMgtConstant.ENGINE_PATH);\r
return webTarget.request(MediaType.APPLICATION_JSON).post(Entity.entity(content, MediaType.APPLICATION_JSON));\r
}\r
\r
Client client = createClient();\r
ObjectMapper mapper = new ObjectMapper();\r
String content = mapper.writeValueAsString(correlationDeployRule4Engine);\r
- WebTarget webTarget = client.target(MicroServiceConfig.getMsbServerAddr() + RuleMgtConstant.ENGINE_PATH);\r
+ WebTarget webTarget = client.target(MicroServiceConfig.getMsbServerAddrWithHttpPrefix() + RuleMgtConstant.ENGINE_PATH);\r
return webTarget.request(MediaType.APPLICATION_JSON).put(Entity.entity(content, MediaType.APPLICATION_JSON));\r
}\r
}\r
thrown.expect(CorrelationException.class);
thrown.expectMessage("host");
PowerMockito.mockStatic(MicroServiceConfig.class);
- when(MicroServiceConfig.getServiceAddrInfoFromCBS("holmes-rule-mgmt"))
+ when(MicroServiceConfig.getServiceConfigInfoFromCBS("holmes-rule-mgmt"))
.thenReturn("host");
PowerMock.createMock(DcaeConfigurationParser.class);
PowerMock.expectPrivate(DcaeConfigurationParser.class, "parse", "host")
PowerMock.resetAll();
thrown.expect(CorrelationException.class);
PowerMockito.mockStatic(MicroServiceConfig.class);
- when(MicroServiceConfig.getServiceAddrInfoFromCBS("holmes-rule-mgmt"))
+ when(MicroServiceConfig.getServiceConfigInfoFromCBS("holmes-rule-mgmt"))
.thenReturn("host");
PowerMock.createMock(DcaeConfigurationParser.class);
PowerMock.expectPrivate(DcaeConfigurationParser.class, "parse", "host")