aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common/eventmanager/src/test
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2020-05-22 17:28:22 -0400
committerJim Hahn <jrh3@att.com>2020-05-27 17:43:32 -0400
commit8f59dfa64da6617a278558ff563041d6ff7c6670 (patch)
tree49f0f5b4a4544b829b7e4128c69fc5cbb6e5cedc /controlloop/common/eventmanager/src/test
parent584b6dde58b4ace70df7f9b976340a6f3775a2f1 (diff)
Do additional processing when control loop times out
When the overall control loop times out, a notification is sent to POLICY-CL-MGT, but then the event is discarded. Modified the code to update the operation history, if an operation had been started, and to generate an SDNR notification, if appropriate. Applied the same logic for when a lock is lost. Issue-ID: POLICY-2582 Change-Id: I35510ec8a3cfc6b2ca9be5751896f3c0f7d9bd09 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'controlloop/common/eventmanager/src/test')
-rw-r--r--controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager2Test.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager2Test.java b/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager2Test.java
index be8b70b13..6fda667eb 100644
--- a/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager2Test.java
+++ b/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager2Test.java
@@ -240,7 +240,7 @@ public class ControlLoopOperationManager2Test {
}
/**
- * Tests start() when the control loop times out.
+ * Tests start() when the control loop times out before the operation starts.
*/
@Test
public void testStartClTimeout_testHandleTimeout() throws InterruptedException {
@@ -276,8 +276,8 @@ public class ControlLoopOperationManager2Test {
// should have called update() for operation-start, but not for any nextStep()
verify(mgrctx).updated(mgr);
- // should not have tried to store anything in the DB
- verify(dataMgr, never()).store(any(), any(), any(), any());
+ // should have added a record to the DB
+ verify(dataMgr).store(any(), any(), any(), any());
}
@Test