summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuangrong Fu <fu.guangrong@zte.com.cn>2017-10-29 11:41:12 +0800
committerGuangrong Fu <fu.guangrong@zte.com.cn>2017-10-29 11:51:56 +0800
commit51826642f3f759b65d945293bb5dadb81a3aa368 (patch)
tree97c16e3184cfaf0750f29e9e835012303d712cb1
parent8b558989dd5af250972f45b5edd9f3be835f6dcd (diff)
Corret the Field Name when Parsing Msg
Change-Id: I9ac174564f8c200c07a1f26e160f72520eba0de9 Issue-ID: HOLMES-82 Signed-off-by: Guangrong Fu <fu.guangrong@zte.com.cn>
-rw-r--r--dmaap-dsa/src/main/java/org/onap/holmes/dsa/dmaappolling/DMaaPResponseUtil.java4
-rw-r--r--dmaap-dsa/src/test/java/org/onap/holmes/dsa/dmaappolling/DMaaPResponseUtilTest.java12
2 files changed, 8 insertions, 8 deletions
diff --git a/dmaap-dsa/src/main/java/org/onap/holmes/dsa/dmaappolling/DMaaPResponseUtil.java b/dmaap-dsa/src/main/java/org/onap/holmes/dsa/dmaappolling/DMaaPResponseUtil.java
index a445402..6679327 100644
--- a/dmaap-dsa/src/main/java/org/onap/holmes/dsa/dmaappolling/DMaaPResponseUtil.java
+++ b/dmaap-dsa/src/main/java/org/onap/holmes/dsa/dmaappolling/DMaaPResponseUtil.java
@@ -51,13 +51,13 @@ public class DMaaPResponseUtil {
vesAlarm.setEventType(getTextElementByNode(commonEventHeaderJson, "eventType"));
vesAlarm.setInternalHeaderFields(
getTextElementByNode(commonEventHeaderJson, "internalHeaderFields"));
- vesAlarm.setLastEpochMicrosec(commonEventHeaderJson.get("lastEpochMicfrosec").asLong());
+ vesAlarm.setLastEpochMicrosec(commonEventHeaderJson.get("lastEpochMicrosec").asLong());
vesAlarm.setNfcNamingCode(getTextElementByNode(commonEventHeaderJson, "nfcNamingCode"));
vesAlarm.setNfNamingCode(getTextElementByNode(commonEventHeaderJson, "nfNamingCode"));
vesAlarm.setPriority(commonEventHeaderJson.get("priority").asText());
vesAlarm.setReportingEntityId(
getTextElementByNode(commonEventHeaderJson, "reportingEntityId"));
- vesAlarm.setReportingEntityName(commonEventHeaderJson.get("reprotingEntityName").asText());
+ vesAlarm.setReportingEntityName(commonEventHeaderJson.get("reportingEntityName").asText());
vesAlarm.setSequence(commonEventHeaderJson.get("sequence").asInt());
vesAlarm.setSourceId(getTextElementByNode(commonEventHeaderJson, "sourceId"));
vesAlarm.setSourceName(commonEventHeaderJson.get("sourceName").asText());
diff --git a/dmaap-dsa/src/test/java/org/onap/holmes/dsa/dmaappolling/DMaaPResponseUtilTest.java b/dmaap-dsa/src/test/java/org/onap/holmes/dsa/dmaappolling/DMaaPResponseUtilTest.java
index 557a1e7..6737868 100644
--- a/dmaap-dsa/src/test/java/org/onap/holmes/dsa/dmaappolling/DMaaPResponseUtilTest.java
+++ b/dmaap-dsa/src/test/java/org/onap/holmes/dsa/dmaappolling/DMaaPResponseUtilTest.java
@@ -51,12 +51,12 @@ public class DMaaPResponseUtilTest {
+ "\"eventId\":\"112355255-24345\","
+ "\"eventName\":\"4333454333\","
+ "\"eventType\":\"remote\","
- + "\"lastEpochMicfrosec\":333434333,"
+ + "\"lastEpochMicrosec\":333434333,"
+ "\"nfcNamingCode\":\"567422\","
+ "\"nfNamingCode\":\"qweertrr\","
+ "\"priority\":\"High\","
+ "\"reportingEntityId\":\"99888888888\","
- + "\"reprotingEntityName\":\"tianshisdlsdjf\","
+ + "\"reportingEntityName\":\"tianshisdlsdjf\","
+ "\"sequence\":34566,"
+ "\"sourceId\":\"3345556444\","
+ "\"sourceName\":\"nihoahh\","
@@ -173,9 +173,9 @@ public class DMaaPResponseUtilTest {
+ "\"eventId\":\"112355255-24345\","
+ "\"eventName\":\"4333454333\","
+ "\"eventType\":\"remote\","
- + "\"lastEpochMicfrosec\":333434333,"
+ + "\"lastEpochMicrosec\":333434333,"
+ "\"priority\":\"High\","
- + "\"reprotingEntityName\":\"tianshisdlsdjf\","
+ + "\"reportingEntityName\":\"tianshisdlsdjf\","
+ "\"sequence\":34566,"
+ "\"sourceName\":\"nihoahh\","
+ "\"startEpochMicrosec\":54545454,"
@@ -258,9 +258,9 @@ public class DMaaPResponseUtilTest {
+ "\"eventId\":\"112355255-24345\","
+ "\"eventName\":\"4333454333\","
+ "\"eventType\":\"remote\","
- + "\"lastEpochMicfrosec\":333434333,"
+ + "\"lastEpochMicrosec\":333434333,"
+ "\"priority\":\"High\","
- + "\"reprotingEntityName\":\"tianshisdlsdjf\","
+ + "\"reportingEntityName\":\"tianshisdlsdjf\","
+ "\"sequence\":34566,"
+ "\"sourceName\":\"nihoahh\","
+ "\"startEpochMicrosec\":54545454,"