summaryrefslogtreecommitdiffstats
path: root/controlloop/common/eventmanager/src/test/java
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2018-06-27 11:04:11 -0400
committerJim Hahn <jrh3@att.com>2018-06-29 11:07:51 -0400
commitcecd4ac43f199ad9f020d38fb7d1651b296d1703 (patch)
tree827cbcc055db03dd3e21a91fdfff9926f77b635c /controlloop/common/eventmanager/src/test/java
parent9e865fe364ed6aa3445d9b1f1844378c52feab42 (diff)
Add time limit to local guard locking facility
Modified the local policy guard locking facility to add a time parameter. Modified the control loop event manager to extend the lock when lockCurrentOperation() is re-invoked. Modified the rules to retract the lock if the lock request was denied. Reorder assertions in junit test. Change-Id: Ic9b77acbb4881a5a516f30eb56664bad1a5c4d7e 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.java2
1 files changed, 2 insertions, 0 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 182791d22..1af4a312d 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
@@ -755,9 +755,11 @@ public class ControlLoopEventManagerTest {
LockResult<GuardResult, TargetLock> lockLock = manager.lockCurrentOperation();
assertNotNull(lockLock);
+ assertEquals(GuardResult.LOCK_ACQUIRED, lockLock.getA());
LockResult<GuardResult, TargetLock> lockLockAgain = manager.lockCurrentOperation();
assertNotNull(lockLockAgain);
+ assertEquals(GuardResult.LOCK_ACQUIRED, lockLockAgain.getA());
assertEquals(lockLock.getB(), lockLockAgain.getB());
assertEquals(lockLock.getB(), manager.unlockCurrentOperation());