Change topics setup for LCM 59/49559/2
authorElena Kuleshov <ek1439@att.com>
Wed, 30 May 2018 18:13:48 +0000 (14:13 -0400)
committerMarcus G K Williams <marcus.williams@intel.com>
Wed, 30 May 2018 20:40:51 +0000 (13:40 -0700)
- Fix general topic properties.
- Fix junit for getLcmProperties

Change-Id: I424129c18a017908280c6bdc831a6a72ba1192ca
Issue-ID: SO-602
Signed-off-by: Elena Kuleshov <ek1439@att.com>
bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/appc/ApplicationControllerClient.java
bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/appc/ApplicationControllerClientTest.java

index 72ffa96..aa94eb5 100644 (file)
@@ -142,15 +142,9 @@ public class ApplicationControllerClient {
                Properties properties = new Properties();
                Map<String, String> globalProperties = PropertyConfiguration.getInstance()
                                .getProperties("mso.bpmn.urn.properties");
-               if (controllerType==null || controllerType.length()==0 || controllerType.equalsIgnoreCase("appc")) {
-                       properties.put("topic.read", globalProperties.get("appc.client.topic.read"));
-                       properties.put("topic.write", globalProperties.get("appc.client.topic.write"));
-               } else {
-                       properties.put("topic.read", globalProperties.get("appc.client.topic." + controllerType + ".read"));
-                       properties.put("topic.write", globalProperties.get("appc.client.topic." + controllerType + ".write"));
-               }
-               properties.put("topic.sdnc.read", globalProperties.get("appc.client.topic.sdnc.read"));
-               properties.put("topic.sdnc.write", globalProperties.get("appc.client.topic.sdnc.write"));
+               
+               properties.put("topic.read", globalProperties.get("appc.client.topic.read"));
+               properties.put("topic.write", globalProperties.get("appc.client.topic.write"));
                properties.put("sdnc-topic.read", globalProperties.get("appc.client.topic.sdnc.read"));
                properties.put("sdnc-topic.write", globalProperties.get("appc.client.topic.sdnc.write"));
                properties.put("topic.read.timeout", globalProperties.get("appc.client.topic.read.timeout"));
index ec093be..2800a28 100644 (file)
@@ -99,14 +99,15 @@ public class ApplicationControllerClientTest {
                Properties properties = client.getLCMProperties();\r
                assertEquals(properties.get("topic.read"), "APPC-TEST-AMDOCS2");\r
                assertEquals(properties.get("topic.write"), "APPC-TEST-AMDOCS1-DEV3");\r
-               assertEquals(properties.get("topic.sdnc.read"), "SDNC-LCM-READ");\r
-               assertEquals(properties.get("topic.sdnc.write"), "SDNC-LCM-WRITE");\r
+               assertEquals(properties.get("sdnc-topic.read"), "SDNC-LCM-READ");\r
+               assertEquals(properties.get("sdnc-topic.write"), "SDNC-LCM-WRITE");\r
                assertEquals(properties.get("topic.read.timeout"), "120000");\r
                assertEquals(properties.get("client.response.timeout"), "120000");\r
                assertEquals(properties.get("poolMembers"),\r
                                "uebsb93kcdc.it.att.com:3904,uebsb92kcdc.it.att.com:3904,uebsb91kcdc.it.att.com:3904");\r
                assertEquals(properties.get("client.key"), "iaEMAfjsVsZnraBP");\r
                assertEquals(properties.get("client.secret"), "wcivUjsjXzmGFBfxMmyJu9dz");\r
+               assertEquals(properties.get("controllerType"), "appc");\r
        }\r
 \r
 }
\ No newline at end of file