diff options
author | kris.jinka <kris.jinka@samsung.com> | 2018-11-16 10:26:19 +0900 |
---|---|---|
committer | kris.jinka <kris.jinka@samsung.com> | 2018-11-16 11:35:24 +0900 |
commit | 6a55a271c6ca735ceaf4ab306633cb30715561bd (patch) | |
tree | 1354e1c01b15a9e1c44a78fa9247479517f3920d /controlloop/templates/template.demo.clc/src | |
parent | b0ac7e7cb093e5083275aca8c25c8e12aa0d7e75 (diff) |
Remove unused imports in controlpolicy
Remove unused imports that got introduced in recent commits
Fix issue with compile failure of test class due to dependency
in drools-pdp Datamodel classes. Fix test failures due to
compile issues
Issue-ID: POLICY-1251
Change-Id: Ib8e496ab96aaa5de67e4f84fa8de515b3dc22ea5
Signed-off-by: kris.jinka <kris.jinka@samsung.com>
Diffstat (limited to 'controlloop/templates/template.demo.clc/src')
2 files changed, 39 insertions, 11 deletions
diff --git a/controlloop/templates/template.demo.clc/src/test/java/org/onap/policy/template/demo/clc/ControlLoopCoordinationTest.java b/controlloop/templates/template.demo.clc/src/test/java/org/onap/policy/template/demo/clc/ControlLoopCoordinationTest.java index 1d8779999..588d00563 100644 --- a/controlloop/templates/template.demo.clc/src/test/java/org/onap/policy/template/demo/clc/ControlLoopCoordinationTest.java +++ b/controlloop/templates/template.demo.clc/src/test/java/org/onap/policy/template/demo/clc/ControlLoopCoordinationTest.java @@ -60,6 +60,7 @@ import org.onap.policy.controlloop.VirtualControlLoopEvent; import org.onap.policy.controlloop.VirtualControlLoopNotification; import org.onap.policy.controlloop.policy.ControlLoopPolicy; import org.onap.policy.drools.protocol.coders.EventProtocolCoder; +import org.onap.policy.drools.protocol.coders.EventProtocolParams; import org.onap.policy.drools.protocol.coders.JsonProtocolFilter; import org.onap.policy.drools.system.PolicyController; import org.onap.policy.drools.system.PolicyEngine; @@ -104,11 +105,24 @@ public class ControlLoopCoordinationTest implements TopicListener { "org.onap.policy.controlloop.util.Serialization,gsonPretty"); noopTopics = TopicEndpoint.manager.addTopicSinks(noopSinkProperties); - EventProtocolCoder.manager.addEncoder("junit.groupId", "junit.artifactId", "POLICY-CL-MGT", - "org.onap.policy.controlloop.VirtualControlLoopNotification", new JsonProtocolFilter(), null, null, - 1111); - EventProtocolCoder.manager.addEncoder("junit.groupId", "junit.artifactId", "APPC-LCM-READ", - "org.onap.policy.appclcm.LcmRequestWrapper", new JsonProtocolFilter(), null, null, 1111); + EventProtocolCoder.manager.addEncoder(EventProtocolParams.builder() + .groupId("junit.groupId") + .artifactId("junit.artifactId") + .topic("POLICY-CL-MGT") + .eventClass("org.onap.policy.controlloop.VirtualControlLoopNotification") + .protocolFilter(new JsonProtocolFilter()) + .customGsonCoder(null) + .customJacksonCoder(null) + .modelClassLoaderHash(1111)); + EventProtocolCoder.manager.addEncoder(EventProtocolParams.builder() + .groupId("junit.groupId") + .artifactId("junit.artifactId") + .topic("APPC-LCM-READ") + .eventClass("org.onap.policy.appclcm.LcmRequestWrapper") + .protocolFilter(new JsonProtocolFilter()) + .customGsonCoder(null) + .customJacksonCoder(null) + .modelClassLoaderHash(1111)); try { Util.buildAaiSim(); } catch (Exception e) { @@ -172,7 +186,7 @@ public class ControlLoopCoordinationTest implements TopicListener { * control loop (abatement message). * * @param controlLoopName the control loop name - * @param requestID the requestId for this event + * @param requestId the requestId for this event * @param status could be onset or abated * @param target the target name * @param kieSession the kieSession to which this event is being sent diff --git a/controlloop/templates/template.demo.clc/src/test/java/org/onap/policy/template/demo/clc/ControlLoopEventCleanupTest.java b/controlloop/templates/template.demo.clc/src/test/java/org/onap/policy/template/demo/clc/ControlLoopEventCleanupTest.java index da9b2a85b..ef5fac693 100644 --- a/controlloop/templates/template.demo.clc/src/test/java/org/onap/policy/template/demo/clc/ControlLoopEventCleanupTest.java +++ b/controlloop/templates/template.demo.clc/src/test/java/org/onap/policy/template/demo/clc/ControlLoopEventCleanupTest.java @@ -47,6 +47,7 @@ import org.onap.policy.controlloop.VirtualControlLoopEvent; import org.onap.policy.controlloop.eventmanager.ControlLoopEventManager; import org.onap.policy.controlloop.policy.ControlLoopPolicy; import org.onap.policy.drools.protocol.coders.EventProtocolCoder; +import org.onap.policy.drools.protocol.coders.EventProtocolParams; import org.onap.policy.drools.protocol.coders.JsonProtocolFilter; import org.onap.policy.drools.system.PolicyController; import org.onap.policy.drools.system.PolicyEngine; @@ -123,11 +124,24 @@ public class ControlLoopEventCleanupTest { "org.onap.policy.controlloop.util.Serialization,gsonPretty"); final List<TopicSink> noopTopics = TopicEndpoint.manager.addTopicSinks(noopSinkProperties); - EventProtocolCoder.manager.addEncoder("junit.groupId", "junit.artifactId", "POLICY-CL-MGT", - "org.onap.policy.controlloop.VirtualControlLoopNotification", new JsonProtocolFilter(), null, - null, 1111); - EventProtocolCoder.manager.addEncoder("junit.groupId", "junit.artifactId", "APPC-CL", - "org.onap.policy.appc.Request", new JsonProtocolFilter(), null, null, 1111); + EventProtocolCoder.manager.addEncoder(EventProtocolParams.builder() + .groupId("junit.groupId") + .artifactId("junit.artifactId") + .topic("POLICY-CL-MGT") + .eventClass("org.onap.policy.controlloop.VirtualControlLoopNotification") + .protocolFilter(new JsonProtocolFilter()) + .customGsonCoder(null) + .customJacksonCoder(null) + .modelClassLoaderHash(1111)); + EventProtocolCoder.manager.addEncoder(EventProtocolParams.builder() + .groupId("junit.groupId") + .artifactId("junit.artifactId") + .topic("APPC-CL") + .eventClass("org.onap.policy.appc.Request") + .protocolFilter(new JsonProtocolFilter()) + .customGsonCoder(null) + .customJacksonCoder(null) + .modelClassLoaderHash(1111)); try { Util.buildAaiSim(); |