summaryrefslogtreecommitdiffstats
path: root/testsuites/integration/integration-common
diff options
context:
space:
mode:
authorwaqas.ikram <waqas.ikram@ericsson.com>2018-07-12 12:47:09 +0100
committerwaqas.ikram <waqas.ikram@ericsson.com>2018-07-13 11:47:15 +0100
commitcb768ce12516415276ee370112a837014cb8c37c (patch)
tree3d7418e312f3a29126e19d9683a34ad420f6166d /testsuites/integration/integration-common
parent2e32896a4e98fe2047b2e6356d4e9d7dbd3a0252 (diff)
Adding Benchmark module
Change-Id: I4817580bf53bbf46b6890b70d49c8a2edabca749 Issue-ID: POLICY-865 Signed-off-by: waqas.ikram <waqas.ikram@ericsson.com>
Diffstat (limited to 'testsuites/integration/integration-common')
-rw-r--r--testsuites/integration/integration-common/src/main/java/org/onap/policy/apex/test/common/model/EvalDomainModelFactory.java2
-rw-r--r--testsuites/integration/integration-common/src/main/java/org/onap/policy/apex/test/common/model/java/EvalTask_Logic.java7
-rw-r--r--testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/test/common/model/jython/EvalTask_Logic.jython6
3 files changed, 3 insertions, 12 deletions
diff --git a/testsuites/integration/integration-common/src/main/java/org/onap/policy/apex/test/common/model/EvalDomainModelFactory.java b/testsuites/integration/integration-common/src/main/java/org/onap/policy/apex/test/common/model/EvalDomainModelFactory.java
index 65d49f026..83a4ccc76 100644
--- a/testsuites/integration/integration-common/src/main/java/org/onap/policy/apex/test/common/model/EvalDomainModelFactory.java
+++ b/testsuites/integration/integration-common/src/main/java/org/onap/policy/apex/test/common/model/EvalDomainModelFactory.java
@@ -354,7 +354,7 @@ public class EvalDomainModelFactory {
final AxTask eTask = new AxTask(new AxArtifactKey("Task_Event_0", "0.0.1"));
eTask.duplicateInputFields(event0000.getParameterMap());
eTask.duplicateOutputFields(event0001.getParameterMap());
- final AxTaskLogic eAxLogic = new AxTaskLogic(eTask.getKey(), "TaskLogic", (justOneLang == null ? "JRUBY" : justOneLang), logicReader);
+ final AxTaskLogic eAxLogic = new AxTaskLogic(eTask.getKey(), "TaskLogic", (justOneLang == null ? "JYTHON" : justOneLang), logicReader);
eAxLogic.setLogic(
eAxLogic.getLogic().replaceAll("<STATE_NAME>", "Event").replaceAll("<TASK_NAME>", eTask.getKey().getName()).replaceAll("<STATE_NUMBER>", "1"));
eTask.setTaskLogic(eAxLogic);
diff --git a/testsuites/integration/integration-common/src/main/java/org/onap/policy/apex/test/common/model/java/EvalTask_Logic.java b/testsuites/integration/integration-common/src/main/java/org/onap/policy/apex/test/common/model/java/EvalTask_Logic.java
index f86107186..f4fa533f8 100644
--- a/testsuites/integration/integration-common/src/main/java/org/onap/policy/apex/test/common/model/java/EvalTask_Logic.java
+++ b/testsuites/integration/integration-common/src/main/java/org/onap/policy/apex/test/common/model/java/EvalTask_Logic.java
@@ -28,10 +28,7 @@ import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
/**
* The Class EvalTask_Logic is default evaluation task logic in Java.
*/
-//CHECKSTYLE:OFF: checkstyle:typeNames
public class EvalTask_Logic {
- // CHECKSTYLE:ON: checkstyle:typeNames
- private static int stateNo = 0;
/**
* Gets the event.
@@ -43,13 +40,11 @@ public class EvalTask_Logic {
public boolean getEvent(final TaskExecutionContext executor) throws ApexException {
executor.logger.debug(executor.subject.getId());
executor.logger.debug(executor.inFields.toString());
- System.err.println(executor.inFields);
executor.outFields.putAll(executor.inFields);
final Date timeNow = new Date();
- executor.outFields.put("State" + (stateNo + 1) + "Timestamp", timeNow.getTime());
+ executor.outFields.put("State3Timestamp", timeNow.getTime());
executor.logger.debug(executor.outFields.toString());
- stateNo++;
return true;
}
}
diff --git a/testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/test/common/model/jython/EvalTask_Logic.jython b/testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/test/common/model/jython/EvalTask_Logic.jython
index bc803ebf2..aa6525673 100644
--- a/testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/test/common/model/jython/EvalTask_Logic.jython
+++ b/testsuites/integration/integration-common/src/main/resources/org/onap/policy/apex/test/common/model/jython/EvalTask_Logic.jython
@@ -19,18 +19,14 @@
#-------------------------------------------------------------------------------
from java.lang import Boolean
-from java.lang import Byte
from java.lang import Long
from java.util import Date
executor.logger.debug('id: ' + executor.subject.id)
executor.logger.debug('inFields: ' + executor.inFields.toString())
-
-executor.outFields = executor.createOutgoingEvent(outEvent)
executor.outFields.putAll(executor.inFields)
-timeValue = Long(Date().getTime());
-executor.outFields["State<STATE_NUMBER>Timestamp"] = timeValue
+executor.outFields["State<STATE_NUMBER>Timestamp"] = Long(Date().getTime())
executor.logger.debug('outFields: ' + executor.outFields.toString())
returnValue = Boolean.TRUE