diff options
author | Jim Hahn <jrh3@att.com> | 2021-06-28 15:04:36 -0400 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2021-06-29 10:21:49 -0400 |
commit | 4d4547ee4b3a6be75cf2c01f3065b129fddcfd3b (patch) | |
tree | c98e2237ab5565ba4af267814fb484fbae14dd64 /feature-distributed-locking/src/test/java | |
parent | d2b5424c17ef26d5e71b3014234cfd02f7854eca (diff) |
Use unique name in drools PdpMessages
Also modified distributed locking to use the unique name, in case the DB
is shared.
Issue-ID: POLICY-3410
Change-Id: I046a9ffdcb62f3d84d7d388a1e64bcf025fbbf75
Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'feature-distributed-locking/src/test/java')
-rw-r--r-- | feature-distributed-locking/src/test/java/org/onap/policy/distributed/locking/DistributedLockManagerTest.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/feature-distributed-locking/src/test/java/org/onap/policy/distributed/locking/DistributedLockManagerTest.java b/feature-distributed-locking/src/test/java/org/onap/policy/distributed/locking/DistributedLockManagerTest.java index d36fbe1f..2fbdb26b 100644 --- a/feature-distributed-locking/src/test/java/org/onap/policy/distributed/locking/DistributedLockManagerTest.java +++ b/feature-distributed-locking/src/test/java/org/onap/policy/distributed/locking/DistributedLockManagerTest.java @@ -441,13 +441,13 @@ public class DistributedLockManagerTest { assertEquals(5, getRecordCount()); // expire one record - updateRecord(RESOURCE, feature.getHostName(), feature.getUuidString(), -1); + updateRecord(RESOURCE, feature.getPdpName(), feature.getUuidString(), -1); // change host of another record updateRecord(RESOURCE3, OTHER_HOST, feature.getUuidString(), HOLD_SEC); // change uuid of another record - updateRecord(RESOURCE5, feature.getHostName(), OTHER_OWNER, HOLD_SEC); + updateRecord(RESOURCE5, feature.getPdpName(), OTHER_OWNER, HOLD_SEC); // run the checker @@ -569,7 +569,7 @@ public class DistributedLockManagerTest { assertEquals(3, getRecordCount()); // expire one record - updateRecord(RESOURCE, feature.getHostName(), feature.getUuidString(), -1); + updateRecord(RESOURCE, feature.getPdpName(), feature.getUuidString(), -1); // arrange to free lock4 while the checker is running freeLock.set(lock4); @@ -1578,7 +1578,7 @@ public class DistributedLockManagerTest { + " WHERE resourceId=? AND host=? AND owner=?")) { stmt.setString(1, resourceId); - stmt.setString(2, feature.getHostName()); + stmt.setString(2, feature.getPdpName()); stmt.setString(3, uuidString); try (ResultSet result = stmt.executeQuery()) { @@ -1603,7 +1603,7 @@ public class DistributedLockManagerTest { * @throws SQLException if an error occurs accessing the DB */ private void insertRecord(String resourceId, String uuidString, int expireOffset) throws SQLException { - this.insertRecord(resourceId, feature.getHostName(), uuidString, expireOffset); + this.insertRecord(resourceId, feature.getPdpName(), uuidString, expireOffset); } private void insertRecord(String resourceId, String hostName, String uuidString, int expireOffset) |