diff options
author | adheli.tavares <adheli.tavares@est.tech> | 2021-07-05 14:59:40 +0100 |
---|---|---|
committer | adheli.tavares <adheli.tavares@est.tech> | 2021-07-07 13:07:40 +0100 |
commit | 43ed6b71f24a06834ee9fd6f7ceb28eda2c351ba (patch) | |
tree | a5418aee5608702ad02f900f33442ebb624abe7d /models-pdp/src/test/java/org | |
parent | d6d78efe6a355805ad384ded50e2a25e31e7345a (diff) |
Update pdp statistics to count deploy/undeploy separately.
Issue-ID: POLICY-3383
Change-Id: I41e2668bdebd732149db0ccbe160b67b9952a8d9
Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Diffstat (limited to 'models-pdp/src/test/java/org')
2 files changed, 12 insertions, 3 deletions
diff --git a/models-pdp/src/test/java/org/onap/policy/models/pdp/concepts/PdpStatisticsTest.java b/models-pdp/src/test/java/org/onap/policy/models/pdp/concepts/PdpStatisticsTest.java index 4c099e6b5..001c80b7f 100644 --- a/models-pdp/src/test/java/org/onap/policy/models/pdp/concepts/PdpStatisticsTest.java +++ b/models-pdp/src/test/java/org/onap/policy/models/pdp/concepts/PdpStatisticsTest.java @@ -45,12 +45,15 @@ public class PdpStatisticsTest { pdpStat.setPdpGroupName("PDPGroup0"); pdpStat.setPdpSubGroupName("PDPSubGroup0"); pdpStat.setTimeStamp(Instant.EPOCH); - pdpStat.setPolicyDeployCount(3); - pdpStat.setPolicyDeploySuccessCount(1); - pdpStat.setPolicyDeployFailCount(2); pdpStat.setPolicyExecutedCount(9); pdpStat.setPolicyExecutedSuccessCount(4); pdpStat.setPolicyExecutedFailCount(5); + pdpStat.setPolicyDeployCount(3); + pdpStat.setPolicyDeploySuccessCount(1); + pdpStat.setPolicyDeployFailCount(2); + pdpStat.setPolicyUndeployCount(4); + pdpStat.setPolicyUndeploySuccessCount(3); + pdpStat.setPolicyUndeployFailCount(1); pdpStat.setEngineStats(new ArrayList<>()); return pdpStat; } diff --git a/models-pdp/src/test/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdpStatisticsTest.java b/models-pdp/src/test/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdpStatisticsTest.java index 819c3b6e7..7c0522ff9 100644 --- a/models-pdp/src/test/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdpStatisticsTest.java +++ b/models-pdp/src/test/java/org/onap/policy/models/pdp/persistence/concepts/JpaPdpStatisticsTest.java @@ -118,6 +118,9 @@ public class JpaPdpStatisticsTest { assertEquals(pdpStat.getPolicyDeployCount(), jpaPdpStat.getPolicyDeployCount()); assertEquals(pdpStat.getPolicyDeploySuccessCount(), jpaPdpStat.getPolicyDeploySuccessCount()); assertEquals(pdpStat.getPolicyDeployFailCount(), jpaPdpStat.getPolicyDeployFailCount()); + assertEquals(pdpStat.getPolicyUndeployCount(), jpaPdpStat.getPolicyUndeployCount()); + assertEquals(pdpStat.getPolicyUndeploySuccessCount(), jpaPdpStat.getPolicyUndeploySuccessCount()); + assertEquals(pdpStat.getPolicyUndeployFailCount(), jpaPdpStat.getPolicyUndeployFailCount()); assertEquals(pdpStat.getPolicyExecutedCount(), jpaPdpStat.getPolicyExecutedCount()); assertEquals(pdpStat.getPolicyExecutedSuccessCount(), jpaPdpStat.getPolicyExecutedSuccessCount()); assertEquals(pdpStat.getPolicyExecutedFailCount(), jpaPdpStat.getPolicyExecutedFailCount()); @@ -133,6 +136,9 @@ public class JpaPdpStatisticsTest { pdpStat.setPolicyDeployCount(3); pdpStat.setPolicyDeploySuccessCount(1); pdpStat.setPolicyDeployFailCount(2); + pdpStat.setPolicyUndeployCount(5); + pdpStat.setPolicyUndeploySuccessCount(2); + pdpStat.setPolicyUndeployFailCount(3); pdpStat.setPolicyExecutedCount(9); pdpStat.setPolicyExecutedSuccessCount(4); pdpStat.setPolicyExecutedFailCount(5); |