aboutsummaryrefslogtreecommitdiffstats
path: root/policy-core/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'policy-core/src/test/java')
-rw-r--r--policy-core/src/test/java/org/onap/policy/drools/core/lock/SimpleLockManagerTest.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/policy-core/src/test/java/org/onap/policy/drools/core/lock/SimpleLockManagerTest.java b/policy-core/src/test/java/org/onap/policy/drools/core/lock/SimpleLockManagerTest.java
index df6fb10a..feabdbc0 100644
--- a/policy-core/src/test/java/org/onap/policy/drools/core/lock/SimpleLockManagerTest.java
+++ b/policy-core/src/test/java/org/onap/policy/drools/core/lock/SimpleLockManagerTest.java
@@ -116,7 +116,7 @@ public class SimpleLockManagerTest {
assertTrue(mgr.isLockedBy(RESOURCE_A, OWNER1));
// extend the lock
- mgr.lock(RESOURCE_A, OWNER1, MAX_AGE_SEC);
+ mgr.refresh(RESOURCE_A, OWNER1, MAX_AGE_SEC);
// verify still locked after sleeping the other half of the cycle
testTime.sleep(MAX_AGE_MS/2+1);
@@ -132,7 +132,7 @@ public class SimpleLockManagerTest {
mgr.lock(RESOURCE_A, OWNER1, MAX_AGE_SEC);
// same owner
- assertTrue(mgr.lock(RESOURCE_A, OWNER1, MAX_AGE_SEC));
+ assertFalse(mgr.lock(RESOURCE_A, OWNER1, MAX_AGE_SEC));
// different owner
assertFalse(mgr.lock(RESOURCE_A, OWNER2, MAX_AGE_SEC));