summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--engine-d/src/main/java/org/onap/holmes/engine/mqconsumer/MQConsumer.java6
-rw-r--r--engine-d/src/test/java/org/onap/holmes/engine/mqconsumer/MQConsumerTest.java8
2 files changed, 7 insertions, 7 deletions
diff --git a/engine-d/src/main/java/org/onap/holmes/engine/mqconsumer/MQConsumer.java b/engine-d/src/main/java/org/onap/holmes/engine/mqconsumer/MQConsumer.java
index bd77312..e77146f 100644
--- a/engine-d/src/main/java/org/onap/holmes/engine/mqconsumer/MQConsumer.java
+++ b/engine-d/src/main/java/org/onap/holmes/engine/mqconsumer/MQConsumer.java
@@ -50,9 +50,9 @@ public class MQConsumer {
public void registerAlarmTopicListener() {
String brokerURL =
- "tcp://" + mqConfigProvider.get().brokerIp + ":" + mqConfigProvider.get().brokerPort;
- connectionFactory = new ActiveMQConnectionFactory(mqConfigProvider.get().brokerUsername,
- mqConfigProvider.get().brokerPassword, brokerURL);
+ "tcp://" + mqConfigProvider.get().getBrokerIp() + ":" + mqConfigProvider.get().getBrokerPort();
+ connectionFactory = new ActiveMQConnectionFactory(mqConfigProvider.get().getBrokerUsername(),
+ mqConfigProvider.get().getBrokerPassword(), brokerURL);
AlarmMqMessageListener listener = new AlarmMqMessageListener();
listener.receive();
diff --git a/engine-d/src/test/java/org/onap/holmes/engine/mqconsumer/MQConsumerTest.java b/engine-d/src/test/java/org/onap/holmes/engine/mqconsumer/MQConsumerTest.java
index b1ea3cb..5135007 100644
--- a/engine-d/src/test/java/org/onap/holmes/engine/mqconsumer/MQConsumerTest.java
+++ b/engine-d/src/test/java/org/onap/holmes/engine/mqconsumer/MQConsumerTest.java
@@ -66,10 +66,10 @@ public class MQConsumerTest {
@Test
public void init() throws Exception {
MQConfig mqConfig = new MQConfig();
- mqConfig.brokerIp = "127.0.0.1";
- mqConfig.brokerPort = 4567;
- mqConfig.brokerUsername = "admin";
- mqConfig.brokerPassword = "admin";
+ mqConfig.setBrokerIp("127.0.0.1");
+ mqConfig.setBrokerPort(61616);
+ mqConfig.setBrokerPassword("admin");
+ mqConfig.setBrokerUsername("admin");
expect(mqConfigProvider.get()).andReturn(mqConfig).anyTimes();
PowerMock.replayAll();