Fixed MSB Reg Issues
[holmes/engine-management.git] / engine-d / src / main / java / org / onap / holmes / engine / EngineDActiveApp.java
index 19a9153..c045050 100644 (file)
@@ -43,6 +43,7 @@ public class EngineDActiveApp extends IOCApplication<EngineDAppConfig> {
         new EngineDActiveApp().run(args);
     }
 
+    @Override
     public void run(EngineDAppConfig configuration, Environment environment) throws Exception {
         super.run(configuration, environment);
 
@@ -53,7 +54,7 @@ public class EngineDActiveApp extends IOCApplication<EngineDAppConfig> {
             log.warn(e.getMessage(), e);
         }
 
-        if (!System.getenv("TESTING").equals("1")) {
+        if (!"1".equals(System.getenv("TESTING"))) {
             ScheduledExecutorService service = Executors.newSingleThreadScheduledExecutor();
             service.scheduleAtFixedRate(
                     new DcaeConfigurationPolling(MicroServiceConfig.getEnv(MicroServiceConfig.HOSTNAME)), 0,
@@ -76,7 +77,11 @@ public class EngineDActiveApp extends IOCApplication<EngineDAppConfig> {
         Set<Node> nodes = new HashSet<>();
         Node node = new Node();
         node.setIp(serviceAddrInfo[0]);
-        node.setPort(serviceAddrInfo[1]);
+        node.setPort("9102");
+        node.setCheckType("HTTP");
+        node.setCheckUrl(String.format("https://%s:%s/api/holmes-engine-mgmt/v1/healthcheck", serviceAddrInfo[0], "9102"));
+        node.setCheckTimeOut("60s");
+        node.setCheckInterval("60s");
         nodes.add(node);
         msinfo.setNodes(nodes);
         return msinfo;