aboutsummaryrefslogtreecommitdiffstats
path: root/feature-session-persistence
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2018-10-01 13:52:03 -0400
committerJim Hahn <jrh3@att.com>2018-10-02 08:57:59 -0400
commiteac53deaf9aec175e36f32bef30919392227f8e5 (patch)
treeb15584516cac84cbe061377f9d9a9a07a224b87e /feature-session-persistence
parenta0e0c7840f72392152a970d88a5a66d394c4a793 (diff)
Add junit coverage to drools-pdp
Added coverage to distributed locking. Added coverage to test-transaction - still more to do. Added coverage to healthcheck - still more to do. Also fixed "code smell" in pooling. Also fixed "code smell" in session persistence. Fixed typo in comment. Removed unneeded setUp() method from test. Fixed new checkstyle errors. Fixed another new checkstyle error. Change-Id: I0d2ab13fcbd64486af88affb02e114e624c6a3d1 Issue-ID: POLICY-1148 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'feature-session-persistence')
-rw-r--r--feature-session-persistence/src/main/java/org/onap/policy/drools/persistence/PersistenceFeature.java3
-rw-r--r--feature-session-persistence/src/test/java/org/onap/policy/drools/persistence/DroolsSessionEntityTest.java3
2 files changed, 4 insertions, 2 deletions
diff --git a/feature-session-persistence/src/main/java/org/onap/policy/drools/persistence/PersistenceFeature.java b/feature-session-persistence/src/main/java/org/onap/policy/drools/persistence/PersistenceFeature.java
index 332e2984..13264d60 100644
--- a/feature-session-persistence/src/main/java/org/onap/policy/drools/persistence/PersistenceFeature.java
+++ b/feature-session-persistence/src/main/java/org/onap/policy/drools/persistence/PersistenceFeature.java
@@ -543,8 +543,7 @@ public class PersistenceFeature implements PolicySessionFeatureAPI, PolicyEngine
logger.error("Clean up of sessioninfo table failed", e);
}
- // TODO: delete DroolsSessionEntity where sessionId not in
- // (sessinfo.xxx)
+ // delete DroolsSessionEntity where sessionId not in (sessinfo.xxx)?
sessInfoCleaned = true;
}
diff --git a/feature-session-persistence/src/test/java/org/onap/policy/drools/persistence/DroolsSessionEntityTest.java b/feature-session-persistence/src/test/java/org/onap/policy/drools/persistence/DroolsSessionEntityTest.java
index b2dcfb52..5fbb905b 100644
--- a/feature-session-persistence/src/test/java/org/onap/policy/drools/persistence/DroolsSessionEntityTest.java
+++ b/feature-session-persistence/src/test/java/org/onap/policy/drools/persistence/DroolsSessionEntityTest.java
@@ -103,6 +103,9 @@ public class DroolsSessionEntityTest {
@Test
public void testEqualsObject() {
DroolsSessionEntity entity = makeEnt("mynameA", 1);
+
+ // diff object type
+ assertFalse(entity.equals("hello"));
// reflexive
assertTrue(entity.equals(entity));