diff options
author | arkadiusz.adamski <aadamski@est.tech> | 2021-03-11 10:09:10 +0000 |
---|---|---|
committer | arkadiusz.adamski <aadamski@est.tech> | 2021-03-16 17:02:45 +0000 |
commit | 08bdce9e72794993c1bd08a9ef913c8fb827ed6f (patch) | |
tree | 90d781e3dd4f8daa923ec191b6517712af60e63a /plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java | |
parent | 1427ee15da3fc155d96b495925f47bfcccc1c2b5 (diff) |
Increase code coverage
- increased test coverage in plugins-event-carrier-restserver package
Issue-ID: POLICY-3092
Change-Id: I10ad7f0dd24293de6ce426553c7bc7a2fe3be013
Signed-off-by: arkadiusz.adamski <aadamski@est.tech>
Diffstat (limited to 'plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java')
2 files changed, 10 insertions, 0 deletions
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/ApexRestServerConsumer.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/ApexRestServerConsumer.java index 80ccda729..3bfde18e3 100644 --- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/ApexRestServerConsumer.java +++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/ApexRestServerConsumer.java @@ -24,6 +24,9 @@ package org.onap.policy.apex.plugins.event.carrier.restserver; import java.util.Properties; import java.util.concurrent.atomic.AtomicLong; import javax.ws.rs.core.Response; +import lombok.AccessLevel; +import lombok.Getter; +import lombok.Setter; import org.onap.policy.apex.core.infrastructure.threading.ThreadUtilities; import org.onap.policy.apex.service.engine.event.ApexEventException; import org.onap.policy.apex.service.engine.event.ApexEventReceiver; @@ -50,9 +53,11 @@ public class ApexRestServerConsumer extends ApexPluginsEventConsumer { private static final long REST_SERVER_CONSUMER_WAIT_SLEEP_TIME = 50; // The event receiver that will receive events from this consumer + @Setter(AccessLevel.PACKAGE) private ApexEventReceiver eventReceiver; // The local HTTP server to use for REST call reception if we are running a local Grizzly server + @Getter(AccessLevel.PACKAGE) private HttpServletServer server; // Holds the next identifier for event execution. diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/RestServerCarrierTechnologyParameters.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/RestServerCarrierTechnologyParameters.java index 42613bcf8..afc07da95 100644 --- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/RestServerCarrierTechnologyParameters.java +++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/RestServerCarrierTechnologyParameters.java @@ -21,7 +21,9 @@ package org.onap.policy.apex.plugins.event.carrier.restserver; +import lombok.AccessLevel; import lombok.Getter; +import lombok.Setter; import org.onap.policy.apex.service.parameters.carriertechnology.CarrierTechnologyParameters; import org.onap.policy.common.parameters.GroupValidationResult; import org.onap.policy.common.parameters.ValidationStatus; @@ -58,8 +60,11 @@ public class RestServerCarrierTechnologyParameters extends CarrierTechnologyPara public static final String RESTSERVER_EVENT_CONSUMER_PLUGIN_CLASS = ApexRestServerConsumer.class.getName(); // REST server parameters + @Setter(AccessLevel.PACKAGE) private boolean standalone = false; + @Setter(AccessLevel.PACKAGE) private String host = null; + @Setter(AccessLevel.PACKAGE) private int port = -1; private String userName; private String password; |