diff options
author | adheli.tavares <adheli.tavares@est.tech> | 2021-07-06 16:49:41 +0100 |
---|---|---|
committer | Adheli Tavares <adheli.tavares@est.tech> | 2021-07-07 15:08:09 +0000 |
commit | 916347f202c640a1694e10784d9fe6428b024afb (patch) | |
tree | ca1c1f05124f7a9a1064c9d55d2042abed3bd1c5 | |
parent | fdbd773c3a09b8002c51393c529597b671b2d042 (diff) |
Update pdp statistics to count deploy/undeploy separately.
Issue-ID: POLICY-3383
Change-Id: Iec7875fb1fa6a4a360b8cfdff0b80f697a289de3
Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
-rw-r--r-- | main/src/main/java/org/onap/policy/pap/main/comm/PdpStatusMessageHandler.java | 3 | ||||
-rw-r--r-- | main/src/test/java/org/onap/policy/pap/main/comm/PdpHeartbeatListenerTest.java | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/main/src/main/java/org/onap/policy/pap/main/comm/PdpStatusMessageHandler.java b/main/src/main/java/org/onap/policy/pap/main/comm/PdpStatusMessageHandler.java index 45febe95..4ffbe622 100644 --- a/main/src/main/java/org/onap/policy/pap/main/comm/PdpStatusMessageHandler.java +++ b/main/src/main/java/org/onap/policy/pap/main/comm/PdpStatusMessageHandler.java @@ -349,6 +349,9 @@ public class PdpStatusMessageHandler extends PdpMessageGenerator { .append(message.getStatistics().getPolicyDeployCount() < 0, false) .append(message.getStatistics().getPolicyDeployFailCount() < 0, false) .append(message.getStatistics().getPolicyDeploySuccessCount() < 0, false) + .append(message.getStatistics().getPolicyUndeployCount() < 0, false) + .append(message.getStatistics().getPolicyUndeployFailCount() < 0, false) + .append(message.getStatistics().getPolicyUndeploySuccessCount() < 0, false) .append(message.getStatistics().getPolicyExecutedCount() < 0, false) .append(message.getStatistics().getPolicyExecutedFailCount() < 0, false) .append(message.getStatistics().getPolicyExecutedSuccessCount() < 0, false).build(); diff --git a/main/src/test/java/org/onap/policy/pap/main/comm/PdpHeartbeatListenerTest.java b/main/src/test/java/org/onap/policy/pap/main/comm/PdpHeartbeatListenerTest.java index 2344c4f3..7ae4b370 100644 --- a/main/src/test/java/org/onap/policy/pap/main/comm/PdpHeartbeatListenerTest.java +++ b/main/src/test/java/org/onap/policy/pap/main/comm/PdpHeartbeatListenerTest.java @@ -342,6 +342,8 @@ public class PdpHeartbeatListenerTest extends End2EndBase { pdpStatistics06.setPolicyDeployCount(-1); pdpStatistics06.setPolicyDeployFailCount(-1); + pdpStatistics06.setPolicyUndeployCount(-1); + pdpStatistics06.setPolicyUndeployFailCount(-1); status5.setStatistics(pdpStatistics06); pdpHeartbeatListener.onTopicEvent(INFRA, TOPIC, status5); |