aboutsummaryrefslogtreecommitdiffstats
path: root/feature-pooling-dmaap
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-pooling-dmaap
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-pooling-dmaap')
-rw-r--r--feature-pooling-dmaap/src/main/java/org/onap/policy/drools/pooling/PoolingManagerImpl.java6
-rw-r--r--feature-pooling-dmaap/src/test/java/org/onap/policy/drools/pooling/PoolingFeatureTest.java4
2 files changed, 5 insertions, 5 deletions
diff --git a/feature-pooling-dmaap/src/main/java/org/onap/policy/drools/pooling/PoolingManagerImpl.java b/feature-pooling-dmaap/src/main/java/org/onap/policy/drools/pooling/PoolingManagerImpl.java
index 17d520ad..6b5828c7 100644
--- a/feature-pooling-dmaap/src/main/java/org/onap/policy/drools/pooling/PoolingManagerImpl.java
+++ b/feature-pooling-dmaap/src/main/java/org/onap/policy/drools/pooling/PoolingManagerImpl.java
@@ -205,10 +205,12 @@ public class PoolingManagerImpl implements PoolingManager, TopicListener {
}
}
+ @Override
public String getHost() {
return host;
}
+ @Override
public String getTopic() {
return topic;
}
@@ -232,10 +234,8 @@ public class PoolingManagerImpl implements PoolingManager, TopicListener {
/**
* Indicates that the controller is about to start. Starts the publisher for the
* internal topic, and creates a thread pool for the timers.
- *
- * @throws PoolingFeatureException if the internal topic publisher cannot be started
*/
- public void beforeStart() throws PoolingFeatureException {
+ public void beforeStart() {
synchronized (curLocker) {
if (scheduler == null) {
dmaapMgr.startPublisher();
diff --git a/feature-pooling-dmaap/src/test/java/org/onap/policy/drools/pooling/PoolingFeatureTest.java b/feature-pooling-dmaap/src/test/java/org/onap/policy/drools/pooling/PoolingFeatureTest.java
index 07fc757b..a943575c 100644
--- a/feature-pooling-dmaap/src/test/java/org/onap/policy/drools/pooling/PoolingFeatureTest.java
+++ b/feature-pooling-dmaap/src/test/java/org/onap/policy/drools/pooling/PoolingFeatureTest.java
@@ -478,11 +478,11 @@ public class PoolingFeatureTest {
assertFalse(pool.beforeStart(controllerDisabled));
}
- @Test(expected = PoolingFeatureRtException.class)
+ @Test(expected = RuntimeException.class)
public void testDoManager_Ex() throws Exception {
// generate exception
- doThrow(new PoolingFeatureException()).when(mgr1).beforeStart();
+ doThrow(new RuntimeException()).when(mgr1).beforeStart();
pool.beforeStart(controller1);
}