aboutsummaryrefslogtreecommitdiffstats
path: root/services/services-engine/src
diff options
context:
space:
mode:
Diffstat (limited to 'services/services-engine/src')
-rw-r--r--services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/ApexParameterConstants.java2
-rw-r--r--services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/ApexParameterHandler.java6
-rw-r--r--services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/ApexParameters.java3
-rw-r--r--services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/CarrierTechnologyParameters.java3
-rw-r--r--services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/CarrierTechnologyParametersJSONAdapter.java12
-rw-r--r--services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/engineservice/EngineServiceParameters.java3
-rw-r--r--services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/engineservice/EngineServiceParametersJSONAdapter.java16
-rw-r--r--services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventhandler/EventHandlerParameters.java54
-rw-r--r--services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventprotocol/EventProtocolParameters.java3
-rw-r--r--services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventprotocol/EventProtocolParametersJSONAdapter.java12
-rw-r--r--services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventprotocol/EventProtocolTextCharDelimitedParameters.java3
-rw-r--r--services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ContextParameterTests.java162
-rw-r--r--services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ParameterTests.java24
-rw-r--r--services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ProducerConsumerTests.java36
-rw-r--r--services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/SyncParameterTests.java49
-rw-r--r--services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperCarrierTechnologyParameters.java3
-rw-r--r--services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperDistributorParameters.java12
-rw-r--r--services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperEventProducer.java1
-rw-r--r--services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperExecutorParameters.java9
-rw-r--r--services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperTokenDelimitedEventProtocolParameters.java2
-rw-r--r--services/services-engine/src/test/resources/parameters/serviceContextOKFullParams.json2
21 files changed, 258 insertions, 159 deletions
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/ApexParameterConstants.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/ApexParameterConstants.java
index 1937fd2bf..4cef1e10b 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/ApexParameterConstants.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/ApexParameterConstants.java
@@ -29,7 +29,7 @@ public abstract class ApexParameterConstants {
public static final String EVENT_HANDLER_GROUP_NAME = "EVENT_HANDLER_PARAMETERS";
/**
- * Private default constructor to prevent subclassing
+ * Private default constructor to prevent subclassing.
*/
private ApexParameterConstants() {
// Prevents subclassing
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/ApexParameterHandler.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/ApexParameterHandler.java
index c93e52118..2e8e66ae8 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/ApexParameterHandler.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/ApexParameterHandler.java
@@ -22,6 +22,9 @@ package org.onap.policy.apex.service.parameters;
import java.io.FileReader;
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+
import org.onap.policy.apex.core.engine.EngineParameters;
import org.onap.policy.apex.service.engine.main.ApexCommandLineArguments;
import org.onap.policy.apex.service.parameters.carriertechnology.CarrierTechnologyParameters;
@@ -35,9 +38,6 @@ import org.onap.policy.common.parameters.ParameterService;
import org.slf4j.ext.XLogger;
import org.slf4j.ext.XLoggerFactory;
-import com.google.gson.Gson;
-import com.google.gson.GsonBuilder;
-
/**
* This class handles reading, parsing and validating of Apex parameters from JSON files.
*
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/ApexParameters.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/ApexParameters.java
index 069bcc9a8..87b86a897 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/ApexParameters.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/ApexParameters.java
@@ -305,7 +305,8 @@ public class ApexParameters implements ParameterGroup {
// Check that the peer reference is OK
if (rightModeParameters == null) {
result.setResult(handlerMapVariableName, leftModeParameterEntry.getKey(), ValidationStatus.INVALID,
- PEER_STRING + '"' + leftModeParameters.getPeer(peeredMode) + FOR_PEERED_MODE_STRING + peeredMode
+ PEER_STRING + '"' + leftModeParameters.getPeer(peeredMode) + FOR_PEERED_MODE_STRING
+ + peeredMode
+ " does not exist or is not defined with the same peered mode");
continue;
}
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/CarrierTechnologyParameters.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/CarrierTechnologyParameters.java
index 41e30188b..593c6d86f 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/CarrierTechnologyParameters.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/CarrierTechnologyParameters.java
@@ -29,8 +29,7 @@ import org.onap.policy.common.parameters.ValidationStatus;
* The default carrier technology parameter class that may be specialized by carrier technology plugins that require
* plugin specific parameters.
*
- * <p>
- * The following parameters are defined:
+ * <p>The following parameters are defined:
* <ol>
* <li>label: The label of the carrier technology.
* <li>eventProducerPluginClass: The name of the plugin class that will be used by Apex to produce and emit output
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/CarrierTechnologyParametersJSONAdapter.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/CarrierTechnologyParametersJSONAdapter.java
index e443c1eb0..b4e342f17 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/CarrierTechnologyParametersJSONAdapter.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/CarrierTechnologyParametersJSONAdapter.java
@@ -24,12 +24,6 @@ import java.lang.reflect.Type;
import java.util.HashMap;
import java.util.Map;
-import org.onap.policy.apex.service.engine.event.impl.eventrequestor.EventRequestorCarrierTechnologyParameters;
-import org.onap.policy.apex.service.engine.event.impl.filecarrierplugin.FILECarrierTechnologyParameters;
-import org.onap.policy.common.parameters.ParameterRuntimeException;
-import org.slf4j.ext.XLogger;
-import org.slf4j.ext.XLoggerFactory;
-
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
@@ -38,6 +32,12 @@ import com.google.gson.JsonPrimitive;
import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonSerializer;
+import org.onap.policy.apex.service.engine.event.impl.eventrequestor.EventRequestorCarrierTechnologyParameters;
+import org.onap.policy.apex.service.engine.event.impl.filecarrierplugin.FILECarrierTechnologyParameters;
+import org.onap.policy.common.parameters.ParameterRuntimeException;
+import org.slf4j.ext.XLogger;
+import org.slf4j.ext.XLoggerFactory;
+
/**
* This class deserialises various type of carrier technology parameters from JSON.
*
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/engineservice/EngineServiceParameters.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/engineservice/EngineServiceParameters.java
index 70badae93..ba065d3ef 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/engineservice/EngineServiceParameters.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/engineservice/EngineServiceParameters.java
@@ -36,8 +36,7 @@ import org.onap.policy.apex.core.engine.EngineParameters;
/**
* This class holds the parameters for an Apex Engine Service with multiple engine threads running multiple engines.
*
- * <p>
- * The following parameters are defined:
+ * <p>The following parameters are defined:
* <ol>
* <li>name: The name of the Apex engine service, which can be set to any value that matches the regular expression
* {@link org.onap.policy.apex.model.basicmodel.concepts.AxKey#NAME_REGEXP}.
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/engineservice/EngineServiceParametersJSONAdapter.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/engineservice/EngineServiceParametersJSONAdapter.java
index 98e41f6af..50f4925f3 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/engineservice/EngineServiceParametersJSONAdapter.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/engineservice/EngineServiceParametersJSONAdapter.java
@@ -23,6 +23,14 @@ package org.onap.policy.apex.service.parameters.engineservice;
import java.lang.reflect.Type;
import java.util.Map.Entry;
+import com.google.gson.JsonDeserializationContext;
+import com.google.gson.JsonDeserializer;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonParseException;
+import com.google.gson.JsonSerializationContext;
+import com.google.gson.JsonSerializer;
+
import org.onap.policy.apex.context.impl.schema.java.JavaSchemaHelperParameters;
import org.onap.policy.apex.context.parameters.ContextParameters;
import org.onap.policy.apex.context.parameters.DistributorParameters;
@@ -37,14 +45,6 @@ import org.onap.policy.common.parameters.ParameterRuntimeException;
import org.slf4j.ext.XLogger;
import org.slf4j.ext.XLoggerFactory;
-import com.google.gson.JsonDeserializationContext;
-import com.google.gson.JsonDeserializer;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonObject;
-import com.google.gson.JsonParseException;
-import com.google.gson.JsonSerializationContext;
-import com.google.gson.JsonSerializer;
-
/**
* This class deserializes engine service parameters from JSON format. The class produces an
* {@link EngineServiceParameters} instance from incoming JSON read from a configuration file in JSON format.
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventhandler/EventHandlerParameters.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventhandler/EventHandlerParameters.java
index 76ccd683c..996899052 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventhandler/EventHandlerParameters.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventhandler/EventHandlerParameters.java
@@ -33,12 +33,10 @@ import org.onap.policy.common.parameters.ValidationStatus;
/**
* The parameters for a single event producer, event consumer or synchronous event handler.
*
- * <p>
- * Event producers, consumers, and synchronous event handlers all use a carrier technology and an event protocol so the
+ * <p>Event producers, consumers, and synchronous event handlers all use a carrier technology and an event protocol so the
* actual parameters for each one are the same. Therefore, we use the same class for the parameters of each one.
*
- * <p>
- * The following parameters are defined:
+ * <p>The following parameters are defined:
* <ol>
* <li>carrierTechnologyParameters: The carrier technology is the type of messaging infrastructure used to carry events.
* Examples are File, Kafka or REST.
@@ -341,6 +339,54 @@ public class EventHandlerParameters implements ParameterGroup {
return result;
}
+ /**
+ * Check if we're using synchronous mode
+ *
+ * @return true if if we're using synchronous mode
+ */
+ public boolean isSynchronousMode() {
+ return synchronousMode;
+ }
+
+ /**
+ * The synchronous peer for this event handler
+ * @return the synchronous peer for this event handler
+ */
+ public String getSynchronousPeer() {
+ return synchronousPeer;
+ }
+
+ /**
+ * Get the timeout for synchronous operations
+ * @return the timeout for synchronous operations
+ */
+ public long getSynchronousTimeout() {
+ return synchronousTimeout;
+ }
+
+ /**
+ * Check if this event handler will use requestor mode
+ * @return true if this event handler will use requestor mode
+ */
+ public boolean isRequestorMode() {
+ return requestorMode;
+ }
+
+ /**
+ * The requestor peer for this event handler
+ * @return the requestor peer for this event handler
+ */
+ public String getRequestorPeer() {
+ return requestorPeer;
+ }
+
+ /**
+ * @return the requestorTimeout
+ */
+ public long getRequestorTimeout() {
+ return requestorTimeout;
+ }
+
/*
* (non-Javadoc)
*
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventprotocol/EventProtocolParameters.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventprotocol/EventProtocolParameters.java
index 06b5e41f5..29afc4edb 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventprotocol/EventProtocolParameters.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventprotocol/EventProtocolParameters.java
@@ -29,8 +29,7 @@ import org.onap.policy.common.parameters.ValidationStatus;
* A default event protocol parameter class that may be specialized by event protocol plugins that require plugin
* specific parameters.
*
- * <p>
- * The following parameters are defined:
+ * <p>The following parameters are defined:
* <ol>
* <li>label: The label of the event protocol technology.
* <li>eventProducerPluginClass: The name of the plugin class that will be used by Apex to produce and emit output
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventprotocol/EventProtocolParametersJSONAdapter.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventprotocol/EventProtocolParametersJSONAdapter.java
index 2f09e0a65..645368509 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventprotocol/EventProtocolParametersJSONAdapter.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventprotocol/EventProtocolParametersJSONAdapter.java
@@ -24,12 +24,6 @@ import java.lang.reflect.Type;
import java.util.HashMap;
import java.util.Map;
-import org.onap.policy.apex.service.engine.event.impl.apexprotocolplugin.ApexEventProtocolParameters;
-import org.onap.policy.apex.service.engine.event.impl.jsonprotocolplugin.JSONEventProtocolParameters;
-import org.onap.policy.common.parameters.ParameterRuntimeException;
-import org.slf4j.ext.XLogger;
-import org.slf4j.ext.XLoggerFactory;
-
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
@@ -38,6 +32,12 @@ import com.google.gson.JsonPrimitive;
import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonSerializer;
+import org.onap.policy.apex.service.engine.event.impl.apexprotocolplugin.ApexEventProtocolParameters;
+import org.onap.policy.apex.service.engine.event.impl.jsonprotocolplugin.JSONEventProtocolParameters;
+import org.onap.policy.common.parameters.ParameterRuntimeException;
+import org.slf4j.ext.XLogger;
+import org.slf4j.ext.XLoggerFactory;
+
/**
* This class serialises and deserialises various type of event protocol parameters to and from
* JSON.
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventprotocol/EventProtocolTextCharDelimitedParameters.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventprotocol/EventProtocolTextCharDelimitedParameters.java
index d10d81ce2..bf8d1a5e1 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventprotocol/EventProtocolTextCharDelimitedParameters.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventprotocol/EventProtocolTextCharDelimitedParameters.java
@@ -27,8 +27,7 @@ import org.onap.policy.common.parameters.ValidationStatus;
* An event protocol parameter class for character delimited textual event protocols that may be specialized by event
* protocol plugins that require plugin specific parameters.
*
- * <p>
- * The following parameters are defined:
+ * <p>The following parameters are defined:
* <ol>
* <li>startChar: starting character delimiter for text blocks containing an event.
* <li>endChar: ending character delimiter for text blocks containing an event.
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ContextParameterTests.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ContextParameterTests.java
index 37f15777b..bfda220a5 100644
--- a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ContextParameterTests.java
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ContextParameterTests.java
@@ -39,7 +39,8 @@ public class ContextParameterTests {
@Test
public void noParamsTest() {
- final String[] args = {"-c", "src/test/resources/parameters/serviceContextNoParams.json"};
+ final String[] args =
+ { "-c", "src/test/resources/parameters/serviceContextNoParams.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -47,14 +48,15 @@ public class ContextParameterTests {
fail("This test should throw an exception");
} catch (final ParameterException e) {
assertEquals("error reading parameters from \"src/test/resources/parameters/serviceContextNoParams.json\"\n"
- + "(ParameterRuntimeException):could not find field \"parameterClassName\" in "
- + "\"contextParameters\" entry", e.getMessage());
+ + "(ParameterRuntimeException):could not find field \"parameterClassName\" in "
+ + "\"contextParameters\" entry", e.getMessage());
}
}
@Test
public void badParamsTest() {
- final String[] args = {"-c", "src/test/resources/parameters/serviceContextBadParams.json"};
+ final String[] args =
+ { "-c", "src/test/resources/parameters/serviceContextBadParams.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -62,15 +64,16 @@ public class ContextParameterTests {
fail("This test should throw an exception");
} catch (final ParameterException e) {
assertEquals("error reading parameters from \"src/test/resources/parameters/serviceContextBadParams.json\""
- + "\n(ParameterRuntimeException):failed to deserialize the parameters for "
- + "\"contextParameters\" to parameter class \"hello\"\njava.lang.ClassNotFoundException: hello",
- e.getMessage());
+ + "\n(ParameterRuntimeException):failed to deserialize the parameters for "
+ + "\"contextParameters\" to parameter class \"hello\"\njava.lang.ClassNotFoundException: hello",
+ e.getMessage());
}
}
@Test
public void badPluginParamNameTest() {
- final String[] args = {"-c", "src/test/resources/parameters/serviceContextBadPluginNameParams.json"};
+ final String[] args =
+ { "-c", "src/test/resources/parameters/serviceContextBadPluginNameParams.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -78,33 +81,34 @@ public class ContextParameterTests {
fail("This test should throw an exception");
} catch (final ParameterException e) {
assertEquals("error reading parameters from "
- + "\"src/test/resources/parameters/serviceContextBadPluginNameParams.json\"\n"
- + "(ParameterRuntimeException):could not find field \"parameterClassName\" in "
- + "\"contextParameters\" entry", e.getMessage());
+ + "\"src/test/resources/parameters/serviceContextBadPluginNameParams.json\"\n"
+ + "(ParameterRuntimeException):could not find field \"parameterClassName\" in "
+ + "\"contextParameters\" entry", e.getMessage());
}
}
@Test
public void badClassParamTest() {
- final String[] args = {"-c", "src/test/resources/parameters/serviceContextBadClassParams.json"};
+ final String[] args =
+ { "-c", "src/test/resources/parameters/serviceContextBadClassParams.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
new ApexParameterHandler().getParameters(arguments);
fail("This test should throw an exception");
} catch (final ParameterException e) {
- assertEquals(
- "error reading parameters from \"src/test/resources/parameters/serviceContextBadClassParams.json\""
- + "\n(ParameterRuntimeException):failed to deserialize the parameters for \"contextParameters\""
- + " to parameter class \"java.lang.Integer\"\ncom.google.gson.JsonSyntaxException: "
- + "java.lang.IllegalStateException: Expected NUMBER but was BEGIN_OBJECT at path $",
- e.getMessage());
+ assertEquals("error reading parameters from \"src/test/resources/parameters/serviceContextBadClassParams.json\""
+ + "\n(ParameterRuntimeException):failed to deserialize the parameters for \"contextParameters\""
+ + " to parameter class \"java.lang.Integer\"\ncom.google.gson.JsonSyntaxException: "
+ + "java.lang.IllegalStateException: Expected NUMBER but was BEGIN_OBJECT at path $",
+ e.getMessage());
}
}
@Test
public void badPluginClassTest() {
- final String[] args = {"-c", "src/test/resources/parameters/serviceContextBadPluginClassParams.json"};
+ final String[] args =
+ { "-c", "src/test/resources/parameters/serviceContextBadPluginClassParams.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -112,24 +116,27 @@ public class ContextParameterTests {
fail("This test should throw an exception");
} catch (final ParameterException e) {
assertEquals("error reading parameters from "
- + "\"src/test/resources/parameters/serviceContextBadPluginClassParams.json\""
- + "\n(ClassCastException):org.onap.policy.apex.service.engine.parameters.dummyclasses."
- + "SuperDooperExecutorParameters"
- + " cannot be cast to org.onap.policy.apex.context.parameters.ContextParameters", e.getMessage());
+ + "\"src/test/resources/parameters/serviceContextBadPluginClassParams.json\""
+ + "\n(ClassCastException):org.onap.policy.apex.service.engine.parameters.dummyclasses."
+ + "SuperDooperExecutorParameters"
+ + " cannot be cast to org.onap.policy.apex.context.parameters.ContextParameters",
+ e.getMessage());
}
}
@Test
public void okFlushParamTest() {
- final String[] args = {"-c", "src/test/resources/parameters/serviceContextOKFlushParams.json"};
+ final String[] args =
+ { "-c", "src/test/resources/parameters/serviceContextOKFlushParams.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
final ApexParameters parameters = new ApexParameterHandler().getParameters(arguments);
- assertEquals("org.onap.policy.apex.context.parameters.ContextParameters", parameters
- .getEngineServiceParameters().getEngineParameters().getContextParameters().getClass().getCanonicalName());
+ assertEquals("org.onap.policy.apex.context.parameters.ContextParameters",
+ parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
+ .getClass().getCanonicalName());
assertEquals(123456, parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
- .getPersistorParameters().getFlushPeriod());
+ .getPersistorParameters().getFlushPeriod());
} catch (final ParameterException e) {
fail("This test should not throw any exception: " + e.getMessage());
}
@@ -137,15 +144,17 @@ public class ContextParameterTests {
@Test
public void okDefaultParamTest() {
- final String[] args = {"-c", "src/test/resources/parameters/serviceContextOKDefaultParams.json"};
+ final String[] args =
+ { "-c", "src/test/resources/parameters/serviceContextOKDefaultParams.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
final ApexParameters parameters = new ApexParameterHandler().getParameters(arguments);
- assertEquals("org.onap.policy.apex.context.parameters.ContextParameters", parameters
- .getEngineServiceParameters().getEngineParameters().getContextParameters().getClass().getCanonicalName());
+ assertEquals("org.onap.policy.apex.context.parameters.ContextParameters",
+ parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
+ .getClass().getCanonicalName());
assertEquals(300000, parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
- .getPersistorParameters().getFlushPeriod());
+ .getPersistorParameters().getFlushPeriod());
} catch (final ParameterException e) {
fail("This test should not throw any exception: " + e.getMessage());
}
@@ -153,16 +162,18 @@ public class ContextParameterTests {
@Test
public void okDistParamTest() {
- final String[] args = {"-c", "src/test/resources/parameters/serviceContextOKDistParams.json"};
+ final String[] args =
+ { "-c", "src/test/resources/parameters/serviceContextOKDistParams.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
final ApexParameters parameters = new ApexParameterHandler().getParameters(arguments);
- assertEquals("org.onap.policy.apex.context.parameters.ContextParameters", parameters
- .getEngineServiceParameters().getEngineParameters().getContextParameters().getClass().getCanonicalName());
+ assertEquals("org.onap.policy.apex.context.parameters.ContextParameters",
+ parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
+ .getClass().getCanonicalName());
assertEquals("org.onap.policy.apex.context.parameters.DistributorParameters",
- parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
- .getDistributorParameters().getClass().getCanonicalName());
+ parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
+ .getDistributorParameters().getClass().getCanonicalName());
} catch (final ParameterException e) {
fail("This test should not throw any exception: " + e.getMessage());
}
@@ -170,24 +181,26 @@ public class ContextParameterTests {
@Test
public void okFullDefaultParamTest() {
- final String[] args = {"-c", "src/test/resources/parameters/goodParams.json"};
+ final String[] args =
+ { "-c", "src/test/resources/parameters/goodParams.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
final ApexParameters parameters = new ApexParameterHandler().getParameters(arguments);
- assertEquals("org.onap.policy.apex.context.parameters.ContextParameters", parameters
- .getEngineServiceParameters().getEngineParameters().getContextParameters().getClass().getCanonicalName());
+ assertEquals("org.onap.policy.apex.context.parameters.ContextParameters",
+ parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
+ .getClass().getCanonicalName());
assertEquals("org.onap.policy.apex.context.parameters.DistributorParameters",
- parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
- .getDistributorParameters().getClass().getCanonicalName());
+ parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
+ .getDistributorParameters().getClass().getCanonicalName());
assertEquals("org.onap.policy.apex.context.parameters.LockManagerParameters",
- parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
- .getLockManagerParameters().getClass().getCanonicalName());
+ parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
+ .getLockManagerParameters().getClass().getCanonicalName());
assertEquals("org.onap.policy.apex.context.parameters.PersistorParameters",
- parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
- .getPersistorParameters().getClass().getCanonicalName());
+ parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
+ .getPersistorParameters().getClass().getCanonicalName());
assertEquals(300000, parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
- .getPersistorParameters().getFlushPeriod());
+ .getPersistorParameters().getFlushPeriod());
} catch (final ParameterException e) {
fail("This test should not throw any exception: " + e.getMessage());
}
@@ -195,31 +208,33 @@ public class ContextParameterTests {
@Test
public void okFullParamTest() {
- final String[] args = {"-c", "src/test/resources/parameters/serviceContextOKFullParams.json"};
+ final String[] args =
+ { "-c", "src/test/resources/parameters/serviceContextOKFullParams.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
final ApexParameters parameters = new ApexParameterHandler().getParameters(arguments);
- assertEquals("org.onap.policy.apex.context.parameters.ContextParameters", parameters
- .getEngineServiceParameters().getEngineParameters().getContextParameters().getClass().getCanonicalName());
+ assertEquals("org.onap.policy.apex.context.parameters.ContextParameters",
+ parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
+ .getClass().getCanonicalName());
assertEquals("org.onap.policy.apex.context.parameters.LockManagerParameters",
- parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
- .getLockManagerParameters().getClass().getCanonicalName());
+ parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
+ .getLockManagerParameters().getClass().getCanonicalName());
assertEquals("org.onap.policy.apex.context.parameters.PersistorParameters",
- parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
- .getPersistorParameters().getClass().getCanonicalName());
+ parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
+ .getPersistorParameters().getClass().getCanonicalName());
assertEquals(123456, parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
- .getPersistorParameters().getFlushPeriod());
+ .getPersistorParameters().getFlushPeriod());
- final SuperDooperDistributorParameters infinispanParameters =
- (SuperDooperDistributorParameters) parameters.getEngineServiceParameters().getEngineParameters()
- .getContextParameters().getDistributorParameters();
+ final SuperDooperDistributorParameters infinispanParameters = (SuperDooperDistributorParameters) parameters
+ .getEngineServiceParameters().getEngineParameters().getContextParameters()
+ .getDistributorParameters();
assertEquals("org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperDistributorParameters",
- infinispanParameters.getClass().getCanonicalName());
+ infinispanParameters.getClass().getCanonicalName());
assertEquals("my/lovely/configFile.xml", infinispanParameters.getConfigFile());
assertEquals("holy/stone.xml", infinispanParameters.getJgroupsFile());
- assertEquals(false, infinispanParameters.preferIPv4Stack());
- assertEquals("fatherted", infinispanParameters.getjGroupsBindAddress());
+ assertEquals(false, infinispanParameters.isPreferIPv4Stack());
+ assertEquals("fatherted", infinispanParameters.getJgroupsBindAddress());
} catch (final ParameterException e) {
fail("This test should not throw any exception: " + e.getMessage());
@@ -228,7 +243,8 @@ public class ContextParameterTests {
@Test
public void badClassDistParamTest() {
- final String[] args = {"-c", "src/test/resources/parameters/serviceContextBadClassDistParams.json"};
+ final String[] args =
+ { "-c", "src/test/resources/parameters/serviceContextBadClassDistParams.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -236,15 +252,16 @@ public class ContextParameterTests {
fail("This test should throw an exception");
} catch (final ParameterException e) {
assertEquals("error reading parameters from "
- + "\"src/test/resources/parameters/serviceContextBadClassDistParams.json\"\n"
- + "(ClassCastException):org.onap.policy.apex.context.parameters.ContextParameters cannot be cast to"
- + " org.onap.policy.apex.context.parameters.DistributorParameters", e.getMessage());
+ + "\"src/test/resources/parameters/serviceContextBadClassDistParams.json\"\n"
+ + "(ClassCastException):org.onap.policy.apex.context.parameters.ContextParameters cannot be cast to"
+ + " org.onap.policy.apex.context.parameters.DistributorParameters", e.getMessage());
}
}
@Test
public void badClassLockParamTest() {
- final String[] args = {"-c", "src/test/resources/parameters/serviceContextBadClassLockParams.json"};
+ final String[] args =
+ { "-c", "src/test/resources/parameters/serviceContextBadClassLockParams.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -252,15 +269,16 @@ public class ContextParameterTests {
fail("This test should throw an exception");
} catch (final ParameterException e) {
assertEquals("error reading parameters from "
- + "\"src/test/resources/parameters/serviceContextBadClassLockParams.json\"\n"
- + "(ClassCastException):org.onap.policy.apex.context.parameters.ContextParameters cannot be cast to"
- + " org.onap.policy.apex.context.parameters.LockManagerParameters", e.getMessage());
+ + "\"src/test/resources/parameters/serviceContextBadClassLockParams.json\"\n"
+ + "(ClassCastException):org.onap.policy.apex.context.parameters.ContextParameters cannot be cast to"
+ + " org.onap.policy.apex.context.parameters.LockManagerParameters", e.getMessage());
}
}
@Test
public void badClassPersistParamTest() {
- final String[] args = {"-c", "src/test/resources/parameters/serviceContextBadClassPersistParams.json"};
+ final String[] args =
+ { "-c", "src/test/resources/parameters/serviceContextBadClassPersistParams.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -268,9 +286,9 @@ public class ContextParameterTests {
fail("This test should throw an exception");
} catch (final ParameterException e) {
assertEquals("error reading parameters from "
- + "\"src/test/resources/parameters/serviceContextBadClassPersistParams.json\"\n"
- + "(ClassCastException):org.onap.policy.apex.context.parameters.ContextParameters cannot be cast to"
- + " org.onap.policy.apex.context.parameters.PersistorParameters", e.getMessage());
+ + "\"src/test/resources/parameters/serviceContextBadClassPersistParams.json\"\n"
+ + "(ClassCastException):org.onap.policy.apex.context.parameters.ContextParameters cannot be cast to"
+ + " org.onap.policy.apex.context.parameters.PersistorParameters", e.getMessage());
}
}
}
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ParameterTests.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ParameterTests.java
index 31ccd913f..97724becc 100644
--- a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ParameterTests.java
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ParameterTests.java
@@ -48,7 +48,8 @@ import org.onap.policy.common.parameters.ParameterException;
public class ParameterTests {
@Test
public void invalidParametersNoFileTest() throws ParameterException {
- final String[] args = { "-c", "src/test/resources/parameters/invalidNoFile.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/invalidNoFile.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -62,7 +63,8 @@ public class ParameterTests {
@Test
public void invalidParametersEmptyTest() {
- final String[] args = { "-c", "src/test/resources/parameters/empty.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/empty.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -76,7 +78,8 @@ public class ParameterTests {
@Test
public void invalidParametersNoParamsTest() {
- final String[] args = { "-c", "src/test/resources/parameters/noParams.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/noParams.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -97,7 +100,8 @@ public class ParameterTests {
@Test
public void invalidParametersBlankParamsTest() {
- final String[] args = { "-c", "src/test/resources/parameters/blankParams.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/blankParams.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -123,7 +127,8 @@ public class ParameterTests {
@Test
public void invalidParametersTest() {
- final String[] args = { "-c", "src/test/resources/parameters/badParams.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/badParams.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -171,7 +176,8 @@ public class ParameterTests {
@Test
public void goodParametersTest() {
- final String[] args = { "-c", "src/test/resources/parameters/goodParams.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/goodParams.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -222,7 +228,8 @@ public class ParameterTests {
@Test
public void superDooperParametersTest() {
- final String[] args = { "-c", "src/test/resources/parameters/superDooperParams.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/superDooperParams.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -268,7 +275,8 @@ public class ParameterTests {
assertEquals("some.key.deserailizer", superDooperParameters.getKeyDeserializer());
assertEquals("some.value.deserailizer", superDooperParameters.getValueDeserializer());
- final String[] consumerTopics = { "consumer-out-0", "consumer-out-1", "consumer-out-2" };
+ final String[] consumerTopics =
+ { "consumer-out-0", "consumer-out-1", "consumer-out-2" };
assertEquals(Arrays.asList(consumerTopics), superDooperParameters.getConsumerTopicList());
} catch (final ParameterException e) {
fail("This test should not throw an exception");
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ProducerConsumerTests.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ProducerConsumerTests.java
index 8bcc1bd37..26cf09c38 100644
--- a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ProducerConsumerTests.java
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ProducerConsumerTests.java
@@ -38,7 +38,8 @@ import org.onap.policy.common.parameters.ParameterException;
public class ProducerConsumerTests {
@Test
public void goodParametersTest() {
- final String[] args = { "-c", "src/test/resources/parameters/goodParams.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/goodParams.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -72,7 +73,8 @@ public class ProducerConsumerTests {
@Test
public void noCarrierTechnology() {
- final String[] args = { "-c", "src/test/resources/parameters/prodConsNoCT.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/prodConsNoCT.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -93,7 +95,8 @@ public class ProducerConsumerTests {
@Test
public void noEventProcol() {
- final String[] args = { "-c", "src/test/resources/parameters/prodConsNoEP.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/prodConsNoEP.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -124,7 +127,8 @@ public class ProducerConsumerTests {
@Test
public void noCarrierTechnologyParClass() {
- final String[] args = { "-c", "src/test/resources/parameters/prodConsNoCTParClass.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/prodConsNoCTParClass.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -139,7 +143,8 @@ public class ProducerConsumerTests {
@Test
public void mismatchCarrierTechnologyParClass() {
- final String[] args = { "-c", "src/test/resources/parameters/prodConsMismatchCTParClass.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/prodConsMismatchCTParClass.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -158,7 +163,8 @@ public class ProducerConsumerTests {
@Test
public void wrongTypeCarrierTechnologyParClass() {
- final String[] args = { "-c", "src/test/resources/parameters/prodConsWrongTypeCTParClass.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/prodConsWrongTypeCTParClass.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -177,7 +183,8 @@ public class ProducerConsumerTests {
@Test
public void okFileNameCarrierTechnology() {
- final String[] args = { "-c", "src/test/resources/parameters/prodConsOKFileName.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/prodConsOKFileName.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -195,7 +202,8 @@ public class ProducerConsumerTests {
@Test
public void badFileNameCarrierTechnology() {
- final String[] args = { "-c", "src/test/resources/parameters/prodConsBadFileName.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/prodConsBadFileName.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -220,7 +228,8 @@ public class ProducerConsumerTests {
@Test
public void badEventProtocolParClass() {
- final String[] args = { "-c", "src/test/resources/parameters/prodConsBadEPParClass.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/prodConsBadEPParClass.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -237,7 +246,8 @@ public class ProducerConsumerTests {
@Test
public void noEventProtocolParClass() {
- final String[] args = { "-c", "src/test/resources/parameters/prodConsNoEPParClass.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/prodConsNoEPParClass.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -252,7 +262,8 @@ public class ProducerConsumerTests {
@Test
public void mismatchEventProtocolParClass() {
- final String[] args = { "-c", "src/test/resources/parameters/prodConsMismatchEPParClass.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/prodConsMismatchEPParClass.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -271,7 +282,8 @@ public class ProducerConsumerTests {
@Test
public void wrongTypeEventProtocolParClass() {
- final String[] args = { "-c", "src/test/resources/parameters/prodConsWrongTypeEPParClass.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/prodConsWrongTypeEPParClass.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/SyncParameterTests.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/SyncParameterTests.java
index 1c291786f..7913af84c 100644
--- a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/SyncParameterTests.java
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/SyncParameterTests.java
@@ -45,7 +45,8 @@ import org.onap.policy.common.parameters.ParameterException;
public class SyncParameterTests {
@Test
public void syncBadNoSyncWithPeer() throws ParameterException {
- final String[] args = { "-c", "src/test/resources/parameters/syncBadParamsNoSyncWithPeer.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/syncBadParamsNoSyncWithPeer.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -67,7 +68,8 @@ public class SyncParameterTests {
@Test
public void syncBadNotSyncWithPeer() throws ParameterException {
- final String[] args = { "-c", "src/test/resources/parameters/syncBadParamsNotSyncWithPeer.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/syncBadParamsNotSyncWithPeer.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -89,7 +91,8 @@ public class SyncParameterTests {
@Test
public void syncBadSyncBadPeers() throws ParameterException {
- final String[] args = { "-c", "src/test/resources/parameters/syncBadParamsBadPeers.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/syncBadParamsBadPeers.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -124,7 +127,8 @@ public class SyncParameterTests {
@Test
public void syncBadSyncInvalidTimeout() throws ParameterException {
- final String[] args = { "-c", "src/test/resources/parameters/syncBadParamsInvalidTimeout.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/syncBadParamsInvalidTimeout.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -145,8 +149,8 @@ public class SyncParameterTests {
+ "\"org.onap.policy.apex.service.parameters.eventhandler.EventHandlerParameters\" "
+ "INVALID, specified peered mode \"SYNCHRONOUS\" timeout value \"-3\" is illegal, "
+ "specify a non-negative timeout value in milliseconds\n"
- + " parameter group map \"eventInputParameters\" INVALID, parameter group has status INVALID\n"
- + " parameter group \"SyncConsumer0\" type "
+ + " parameter group map \"eventInputParameters\" INVALID, "
+ + "parameter group has status INVALID\n" + " parameter group \"SyncConsumer0\" type "
+ "\"org.onap.policy.apex.service.parameters.eventhandler.EventHandlerParameters\" INVALID, "
+ "specified peered mode \"SYNCHRONOUS\" timeout value \"-1\" is illegal, "
+ "specify a non-negative timeout value in milliseconds\n"
@@ -159,7 +163,8 @@ public class SyncParameterTests {
@Test
public void syncBadSyncBadTimeout() throws ParameterException {
- final String[] args = { "-c", "src/test/resources/parameters/syncBadParamsBadTimeout.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/syncBadParamsBadTimeout.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -181,7 +186,8 @@ public class SyncParameterTests {
@Test
public void syncBadSyncUnpairedTimeout() throws ParameterException {
- final String[] args = { "-c", "src/test/resources/parameters/syncBadParamsUnpairedTimeout.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/syncBadParamsUnpairedTimeout.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -217,7 +223,8 @@ public class SyncParameterTests {
@Test
public void syncGoodSyncGoodTimeoutProducer() throws ParameterException {
- final String[] args = { "-c", "src/test/resources/parameters/syncGoodParamsProducerTimeout.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/syncGoodParamsProducerTimeout.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -237,7 +244,8 @@ public class SyncParameterTests {
@Test
public void syncGoodSyncGoodTimeoutConsumer() throws ParameterException {
- final String[] args = { "-c", "src/test/resources/parameters/syncGoodParamsConsumerTimeout.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/syncGoodParamsConsumerTimeout.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -257,7 +265,8 @@ public class SyncParameterTests {
@Test
public void syncGoodSyncGoodTimeoutBoth() throws ParameterException {
- final String[] args = { "-c", "src/test/resources/parameters/syncGoodParamsBothTimeout.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/syncGoodParamsBothTimeout.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -277,7 +286,8 @@ public class SyncParameterTests {
@Test
public void syncUnusedConsumerPeers() throws ParameterException {
- final String[] args = { "-c", "src/test/resources/parameters/syncUnusedConsumerPeers.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/syncUnusedConsumerPeers.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -306,7 +316,8 @@ public class SyncParameterTests {
@Test
public void syncMismatchedPeers() throws ParameterException {
- final String[] args = { "-c", "src/test/resources/parameters/syncMismatchedPeers.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/syncMismatchedPeers.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -342,7 +353,8 @@ public class SyncParameterTests {
@Test
public void syncUnusedProducerPeers() throws ParameterException {
- final String[] args = { "-c", "src/test/resources/parameters/syncUnusedProducerPeers.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/syncUnusedProducerPeers.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -369,7 +381,8 @@ public class SyncParameterTests {
@Test
public void syncMismatchedTimeout() throws ParameterException {
- final String[] args = { "-c", "src/test/resources/parameters/syncMismatchedTimeout.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/syncMismatchedTimeout.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -399,7 +412,8 @@ public class SyncParameterTests {
@Test
public void syncGoodParametersTest() {
- final String[] args = { "-c", "src/test/resources/parameters/syncGoodParams.json" };
+ final String[] args =
+ { "-c", "src/test/resources/parameters/syncGoodParams.json" };
final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
try {
@@ -462,7 +476,8 @@ public class SyncParameterTests {
assertEquals("org.apache.superDooper.common.serialization.StringDeserializer",
superDooperParameters.getValueDeserializer());
- final String[] consumerTopics = { "apex-in" };
+ final String[] consumerTopics =
+ { "apex-in" };
assertEquals(Arrays.asList(consumerTopics), superDooperParameters.getConsumerTopicList());
} catch (final ParameterException e) {
fail("This test should not throw an exception");
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperCarrierTechnologyParameters.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperCarrierTechnologyParameters.java
index 3ec84b150..7eaf4c8e1 100644
--- a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperCarrierTechnologyParameters.java
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperCarrierTechnologyParameters.java
@@ -545,7 +545,8 @@ public class SuperDooperCarrierTechnologyParameters extends CarrierTechnologyPar
}
if (valueDeserializer == null || valueDeserializer.trim().length() == 0) {
- result.setResult("valueDeserializer", ValidationStatus.INVALID, "not specified, must be specified as a string");
+ result.setResult("valueDeserializer", ValidationStatus.INVALID,
+ "not specified, must be specified as a string");
}
return result;
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperDistributorParameters.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperDistributorParameters.java
index 72dbc57a6..a8d099654 100644
--- a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperDistributorParameters.java
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperDistributorParameters.java
@@ -40,7 +40,7 @@ public class SuperDooperDistributorParameters extends DistributorParameters {
private String configFile = DEFAULT_SUPER_DOOPER_DISTRIBUTION_CONFIG_FILE;
private String jgroupsFile = DEFAULT_SUPER_DOOPER_DISTRIBUTION_JGROUPS_FILE;
private boolean preferIPv4Stack = DEFAULT_SUPER_DOOPER_JAVA_NET_PREFER_IPV4_STACK;
- private String jGroupsBindAddress = DEFAULT_INFINSPAN_JGROUPS_BIND_ADDRESS;
+ private String jgroupsBindAddress = DEFAULT_INFINSPAN_JGROUPS_BIND_ADDRESS;
public SuperDooperDistributorParameters() {
super();
@@ -62,7 +62,7 @@ public class SuperDooperDistributorParameters extends DistributorParameters {
this.jgroupsFile = jgroupsFile;
}
- public boolean preferIPv4Stack() {
+ public boolean isPreferIPv4Stack() {
return preferIPv4Stack;
}
@@ -70,17 +70,17 @@ public class SuperDooperDistributorParameters extends DistributorParameters {
this.preferIPv4Stack = preferIPv4Stack;
}
- public String getjGroupsBindAddress() {
- return jGroupsBindAddress;
+ public String getJgroupsBindAddress() {
+ return jgroupsBindAddress;
}
public void setjGroupsBindAddress(final String jGroupsBindAddress) {
- this.jGroupsBindAddress = jGroupsBindAddress;
+ this.jgroupsBindAddress = jGroupsBindAddress;
}
@Override
public String toString() {
return "SuperDooperDistributorParameters [configFile=" + configFile + ", jgroupsFile=" + jgroupsFile
- + ", preferIPv4Stack=" + preferIPv4Stack + ", jGroupsBindAddress=" + jGroupsBindAddress + "]";
+ + ", preferIPv4Stack=" + preferIPv4Stack + ", jGroupsBindAddress=" + jgroupsBindAddress + "]";
}
}
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperEventProducer.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperEventProducer.java
index e405107f0..bfd651025 100644
--- a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperEventProducer.java
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperEventProducer.java
@@ -29,6 +29,7 @@ import org.slf4j.ext.XLogger;
import org.slf4j.ext.XLoggerFactory;
/**
+ * Dummy event producer parameters.
* @author John Keeney (john.keeney@ericsson.com)
*/
public class SuperDooperEventProducer implements ApexEventProducer {
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperExecutorParameters.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperExecutorParameters.java
index a7bf4d5c8..270dd9bb6 100644
--- a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperExecutorParameters.java
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperExecutorParameters.java
@@ -23,12 +23,13 @@ package org.onap.policy.apex.service.engine.parameters.dummyclasses;
import org.onap.policy.apex.core.engine.ExecutorParameters;
/**
- * Default Executor parameters for MVEL.
- *
- * @author Liam Fallon (liam.fallon@ericsson.com)
- * @version
+ * Dummy executor parameters.
*/
public class SuperDooperExecutorParameters extends ExecutorParameters {
+
+ /**
+ * Instantiates a new super dooper executor parameters.
+ */
public SuperDooperExecutorParameters() {
this.setTaskExecutorPluginClass(
"org.onap.policy.apex.service.engine.parameters.dummyclasses.DummyTaskExecutor");
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperTokenDelimitedEventProtocolParameters.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperTokenDelimitedEventProtocolParameters.java
index 02d986186..ec4f97d78 100644
--- a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperTokenDelimitedEventProtocolParameters.java
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperTokenDelimitedEventProtocolParameters.java
@@ -24,7 +24,7 @@ import org.onap.policy.apex.service.engine.event.impl.jsonprotocolplugin.JSONEve
import org.onap.policy.apex.service.parameters.eventprotocol.EventProtocolTextTokenDelimitedParameters;
/**
- * @author Liam Fallon (liam.fallon@ericsson.com)
+ * Dummy token delimited parameters.
*/
public class SuperTokenDelimitedEventProtocolParameters extends EventProtocolTextTokenDelimitedParameters {
/** The label of this carrier technology. */
diff --git a/services/services-engine/src/test/resources/parameters/serviceContextOKFullParams.json b/services/services-engine/src/test/resources/parameters/serviceContextOKFullParams.json
index 22991054a..edbcb07df 100644
--- a/services/services-engine/src/test/resources/parameters/serviceContextOKFullParams.json
+++ b/services/services-engine/src/test/resources/parameters/serviceContextOKFullParams.json
@@ -14,7 +14,7 @@
"configFile": "my/lovely/configFile.xml",
"jgroupsFile": "holy/stone.xml",
"preferIPv4Stack": false,
- "jGroupsBindAddress": "fatherted"
+ "jgroupsBindAddress": "fatherted"
},
"lockManagerParameters": {
"parameterClassName": "org.onap.policy.apex.context.parameters.LockManagerParameters"