diff options
author | 2018-05-03 14:47:23 -0400 | |
---|---|---|
committer | 2018-05-04 10:20:48 -0400 | |
commit | 3b6bb8e880d3b56afb7767ea7d0505ceb49f8890 (patch) | |
tree | 40147927cb0b2a2da59680aed3999257e3e6498c /feature-pooling-dmaap/src/test/java/org/onap/policy/drools/pooling/FeatureTest.java | |
parent | d8941a17b30fdc6d24f1c5e9d84685c1fafd7ee6 (diff) |
Fix various problems in pooling
Renamed META-INF SessionAPI to EngineAPI, as it implements the latter.
Created default PoolingFeature.factory object.
Don't delete a controller's pooling manager when stop is called; do
that in afterHalt and afterShutdown. This enables it to be restarted
as long as the controller still exists.
Only stop & start the internal DMaaP topic at the engine level instead
of the controller level. This is necessary to prevent sinks for ALL
controllers from being started each time an individual controller starts.
Clear all bucket assignments when controller is stopped.
Mark test methods with @Override annotation.
Add default property file for pooling feature.
Add license to default property file.
Remove tests for doDeleteManager(), as it no longer exists.
Changed " = " to "=" in the property file.
Change-Id: I80c0c3f1879b5a320044db93e3dfa3b7281cda51
Issue-ID: POLICY-774
Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'feature-pooling-dmaap/src/test/java/org/onap/policy/drools/pooling/FeatureTest.java')
-rw-r--r-- | feature-pooling-dmaap/src/test/java/org/onap/policy/drools/pooling/FeatureTest.java | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/feature-pooling-dmaap/src/test/java/org/onap/policy/drools/pooling/FeatureTest.java b/feature-pooling-dmaap/src/test/java/org/onap/policy/drools/pooling/FeatureTest.java index cc588384..d453e746 100644 --- a/feature-pooling-dmaap/src/test/java/org/onap/policy/drools/pooling/FeatureTest.java +++ b/feature-pooling-dmaap/src/test/java/org/onap/policy/drools/pooling/FeatureTest.java @@ -874,11 +874,6 @@ public class FeatureTest { private static class TopicImpl implements Topic { /** - * {@code True} if this topic is alive/running, {@code false} otherwise. - */ - private boolean alive = false; - - /** * */ public TopicImpl() { @@ -917,32 +912,22 @@ public class FeatureTest { @Override public synchronized boolean start() { - if (alive) { - throw new IllegalStateException("topic already started"); - } - - alive = true; return true; } @Override public synchronized boolean stop() { - if (!alive) { - throw new IllegalStateException("topic is not running"); - } - - alive = false; return true; } @Override public synchronized void shutdown() { - alive = false; + // do nothing } @Override public synchronized boolean isAlive() { - return alive; + return true; } @Override @@ -1081,12 +1066,12 @@ public class FeatureTest { } @Override - public List<TopicSource> initTopicSources(Properties props) { + public List<TopicSource> getTopicSources() { return Arrays.asList(new TopicSourceImpl(context, true)); } @Override - public List<TopicSink> initTopicSinks(Properties props) { + public List<TopicSink> getTopicSinks() { return Arrays.asList(new TopicSinkImpl(context)); } } |