From 7fadb0d88ddd643182a63439510ad8a586653c4a Mon Sep 17 00:00:00 2001 From: Elena Kuleshov Date: Wed, 30 May 2018 14:13:48 -0400 Subject: Change topics setup for LCM - Fix general topic properties. - Fix junit for getLcmProperties Change-Id: I424129c18a017908280c6bdc831a6a72ba1192ca Issue-ID: SO-602 Signed-off-by: Elena Kuleshov --- .../mso/client/appc/ApplicationControllerClient.java | 12 +++--------- .../mso/client/appc/ApplicationControllerClientTest.java | 5 +++-- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/appc/ApplicationControllerClient.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/appc/ApplicationControllerClient.java index 72ffa9641a..aa94eb5797 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/appc/ApplicationControllerClient.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/appc/ApplicationControllerClient.java @@ -142,15 +142,9 @@ public class ApplicationControllerClient { Properties properties = new Properties(); Map 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")); diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/appc/ApplicationControllerClientTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/appc/ApplicationControllerClientTest.java index ec093bebbd..2800a282ee 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/appc/ApplicationControllerClientTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/client/appc/ApplicationControllerClientTest.java @@ -99,14 +99,15 @@ public class ApplicationControllerClientTest { Properties properties = client.getLCMProperties(); assertEquals(properties.get("topic.read"), "APPC-TEST-AMDOCS2"); assertEquals(properties.get("topic.write"), "APPC-TEST-AMDOCS1-DEV3"); - assertEquals(properties.get("topic.sdnc.read"), "SDNC-LCM-READ"); - assertEquals(properties.get("topic.sdnc.write"), "SDNC-LCM-WRITE"); + assertEquals(properties.get("sdnc-topic.read"), "SDNC-LCM-READ"); + assertEquals(properties.get("sdnc-topic.write"), "SDNC-LCM-WRITE"); assertEquals(properties.get("topic.read.timeout"), "120000"); assertEquals(properties.get("client.response.timeout"), "120000"); assertEquals(properties.get("poolMembers"), "uebsb93kcdc.it.att.com:3904,uebsb92kcdc.it.att.com:3904,uebsb91kcdc.it.att.com:3904"); assertEquals(properties.get("client.key"), "iaEMAfjsVsZnraBP"); assertEquals(properties.get("client.secret"), "wcivUjsjXzmGFBfxMmyJu9dz"); + assertEquals(properties.get("controllerType"), "appc"); } } \ No newline at end of file -- cgit 1.2.3-korg