summaryrefslogtreecommitdiffstats
path: root/controlloop/common/eventmanager/src/test/java
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2018-07-05 14:24:36 -0400
committerJim Hahn <jrh3@att.com>2018-07-05 15:47:42 -0400
commitbb8821635720574be3c4c7146657fc8082c7d54b (patch)
tree1f8a7f8081590cab35181806bcdb99a60cc94a87 /controlloop/common/eventmanager/src/test/java
parent48dcb76d2895029d72298b0f81eb0cff71a4ea69 (diff)
Clean up objects for deleted rules
When rules for a closed loop are deleted, associated working memory elements may be left around. Modified the code to retract the various elements. Re-added code to unlock when retracting TargetLock. Add junit tests for new methods. Forgot the junit test for request id. Change-Id: Iec2805adbdb147a643f6163badee05ea353ada88 Issue-ID: POLICY-872 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'controlloop/common/eventmanager/src/test/java')
-rw-r--r--controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManagerTest.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManagerTest.java b/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManagerTest.java
index 02dda2048..0c626e247 100644
--- a/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManagerTest.java
+++ b/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/ControlLoopEventManagerTest.java
@@ -459,7 +459,11 @@ public class ControlLoopEventManagerTest {
@Test
public void testMethods() {
- ControlLoopEventManager clem = new ControlLoopEventManager("MyClosedLoopName", UUID.randomUUID());
+ UUID requestId = UUID.randomUUID();
+ ControlLoopEventManager clem = new ControlLoopEventManager("MyClosedLoopName", requestId);
+
+ assertEquals("MyClosedLoopName", clem.getClosedLoopControlName());
+ assertEquals(requestId, clem.getRequestID());
clem.setActivated(true);
assertEquals(true, clem.isActivated());