aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/plugins-executor/plugins-executor-jython/src/test
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2019-06-26 15:40:41 +0000
committerliamfallon <liam.fallon@est.tech>2019-06-26 15:40:41 +0000
commitce9d82d2c0e863597d84cc8909955e398405f45a (patch)
tree8ebb853119bdf673cf6f9516d428d4cc00080aeb /plugins/plugins-executor/plugins-executor-jython/src/test
parent5f029543f1e673655af2d2974113069df0b6def0 (diff)
Add passthrough properties for APEX engine
APEX event receiver and sender plugins sometimes need to exchange information with tasks, especially in the case of REST communication. This change enables passthrough of Properties from the event carrier technology plugins to APEX task, task selection, and state finalizer logics. Apologies for the size of the review but this change involves passinng the properties through all the APEX components, hence the large number of small changes. Issue-ID: POLICY-1742 Change-Id: I219fd69550f06702ef64adbb165fe7baac422e96 Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'plugins/plugins-executor/plugins-executor-jython/src/test')
-rw-r--r--plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonStateFinalizerExecutorTest.java6
-rw-r--r--plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskExecutorTest.java8
-rw-r--r--plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskSelectExecutorTest.java6
3 files changed, 10 insertions, 10 deletions
diff --git a/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonStateFinalizerExecutorTest.java b/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonStateFinalizerExecutorTest.java
index 76e35e8cc..213dddb9b 100644
--- a/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonStateFinalizerExecutorTest.java
+++ b/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonStateFinalizerExecutorTest.java
@@ -130,7 +130,7 @@ public class JythonStateFinalizerExecutorTest {
stateFinalizerLogic.setLogic(scriptSource);
try {
jsfe.prepare();
- jsfe.execute(-1, null);
+ jsfe.execute(-1, null, null);
fail("test should throw an exception here");
} catch (Exception jtseException) {
assertEquals(
@@ -151,7 +151,7 @@ public class JythonStateFinalizerExecutorTest {
AxEvent axEvent = new AxEvent(new AxArtifactKey("Event", "0.0.1"));
EnEvent event = new EnEvent(axEvent);
try {
- jsfe.execute(0, event);
+ jsfe.execute(0, null, event);
} catch (Exception jtseException) {
jtseException.printStackTrace();
fail("test should not throw an exception here");
@@ -159,7 +159,7 @@ public class JythonStateFinalizerExecutorTest {
try {
jsfe.prepare();
- String stateOutput = jsfe.execute(0, event);
+ String stateOutput = jsfe.execute(0, null, event);
assertEquals("SelectedOutputIsMe", stateOutput);
jsfe.cleanUp();
} catch (Exception jtseException) {
diff --git a/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskExecutorTest.java b/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskExecutorTest.java
index aec7470fa..47e98f391 100644
--- a/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskExecutorTest.java
+++ b/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskExecutorTest.java
@@ -103,7 +103,7 @@ public class JythonTaskExecutorTest {
}
try {
- jte.execute(-1, null);
+ jte.execute(-1, null, null);
fail("test should throw an exception here");
} catch (Exception jteException) {
assertEquals(java.lang.NullPointerException.class, jteException.getClass());
@@ -111,7 +111,7 @@ public class JythonTaskExecutorTest {
Map<String, Object> incomingParameters = new HashMap<>();
try {
- jte.execute(-1, incomingParameters);
+ jte.execute(-1, null, incomingParameters);
fail("test should throw an exception here");
} catch (Exception jteException) {
assertEquals("failed to execute Jython code for task NULL:0.0.0", jteException.getMessage());
@@ -124,7 +124,7 @@ public class JythonTaskExecutorTest {
try {
jte.prepare();
- Map<String, Object> returnMap = jte.execute(-1, incomingParameters);
+ Map<String, Object> returnMap = jte.execute(-1, null, incomingParameters);
assertEquals(0, returnMap.size());
jte.cleanUp();
fail("test should throw an exception here");
@@ -136,7 +136,7 @@ public class JythonTaskExecutorTest {
task.getTaskLogic().setLogic(scriptSource);
try {
jte.prepare();
- Map<String, Object> returnMap = jte.execute(0, incomingParameters);
+ Map<String, Object> returnMap = jte.execute(0, null, incomingParameters);
assertEquals(0, returnMap.size());
jte.cleanUp();
} catch (Exception jteException) {
diff --git a/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskSelectExecutorTest.java b/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskSelectExecutorTest.java
index 7874b2315..119f4d035 100644
--- a/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskSelectExecutorTest.java
+++ b/plugins/plugins-executor/plugins-executor-jython/src/test/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskSelectExecutorTest.java
@@ -99,7 +99,7 @@ public class JythonTaskSelectExecutorTest {
state.getTaskSelectionLogic().setLogic(scriptSource);
try {
jtse.prepare();
- jtse.execute(-1, null);
+ jtse.execute(-1, null, null);
fail("test should throw an exception here");
} catch (Exception jtseException) {
assertEquals(java.lang.NullPointerException.class, jtseException.getClass());
@@ -109,7 +109,7 @@ public class JythonTaskSelectExecutorTest {
EnEvent event = new EnEvent(axEvent);
try {
jtse.prepare();
- jtse.execute(-1, event);
+ jtse.execute(-1, null, event);
fail("test should throw an exception here");
} catch (Exception jtseException) {
assertEquals("failed to execute Jython code for task selection logic in NULL:0.0.0:NULL:NULL",
@@ -120,7 +120,7 @@ public class JythonTaskSelectExecutorTest {
state.getTaskSelectionLogic().setLogic(scriptSource);
try {
jtse.prepare();
- jtse.execute(-1, event);
+ jtse.execute(-1, null, event);
jtse.cleanUp();
} catch (Exception jtseException) {
fail("test should not throw an exception here");