diff options
author | liamfallon <liam.fallon@est.tech> | 2019-06-26 15:40:41 +0000 |
---|---|---|
committer | liamfallon <liam.fallon@est.tech> | 2019-06-26 15:40:41 +0000 |
commit | ce9d82d2c0e863597d84cc8909955e398405f45a (patch) | |
tree | 8ebb853119bdf673cf6f9516d428d4cc00080aeb /plugins/plugins-executor/plugins-executor-jruby/src/test | |
parent | 5f029543f1e673655af2d2974113069df0b6def0 (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-jruby/src/test')
3 files changed, 6 insertions, 6 deletions
diff --git a/plugins/plugins-executor/plugins-executor-jruby/src/test/java/org/onap/policy/apex/plugins/executor/jruby/JrubyStateFinalizerExecutorTest.java b/plugins/plugins-executor/plugins-executor-jruby/src/test/java/org/onap/policy/apex/plugins/executor/jruby/JrubyStateFinalizerExecutorTest.java index c49d502fa..635430fa1 100644 --- a/plugins/plugins-executor/plugins-executor-jruby/src/test/java/org/onap/policy/apex/plugins/executor/jruby/JrubyStateFinalizerExecutorTest.java +++ b/plugins/plugins-executor/plugins-executor-jruby/src/test/java/org/onap/policy/apex/plugins/executor/jruby/JrubyStateFinalizerExecutorTest.java @@ -113,7 +113,7 @@ public class JrubyStateFinalizerExecutorTest { }
try {
- jsfe.execute(-1, null);
+ jsfe.execute(-1, null, null);
fail("test should throw an exception here");
} catch (Exception jtseException) {
assertEquals("execute-post: state finalizer logic execution failure on state \"NULL:0.0.0:NULL:NULL\" on "
@@ -130,7 +130,7 @@ public class JrubyStateFinalizerExecutorTest { state.getStateOutputs().put("SelectedOutputIsMe", null);
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-jruby/src/test/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskExecutorTest.java b/plugins/plugins-executor/plugins-executor-jruby/src/test/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskExecutorTest.java index 5fa9865c8..9f83459d8 100644 --- a/plugins/plugins-executor/plugins-executor-jruby/src/test/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskExecutorTest.java +++ b/plugins/plugins-executor/plugins-executor-jruby/src/test/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskExecutorTest.java @@ -95,7 +95,7 @@ public class JrubyTaskExecutorTest { 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("execute-post: task logic execution failure on task \"NULL\" in model NULL:0.0.0",
@@ -108,7 +108,7 @@ public class JrubyTaskExecutorTest { 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-jruby/src/test/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskSelectExecutorTest.java b/plugins/plugins-executor/plugins-executor-jruby/src/test/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskSelectExecutorTest.java index 6320b59c6..683c43cb4 100644 --- a/plugins/plugins-executor/plugins-executor-jruby/src/test/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskSelectExecutorTest.java +++ b/plugins/plugins-executor/plugins-executor-jruby/src/test/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskSelectExecutorTest.java @@ -99,7 +99,7 @@ public class JrubyTaskSelectExecutorTest { AxEvent axEvent = new AxEvent(new AxArtifactKey("Event", "0.0.1"));
EnEvent event = new EnEvent(axEvent);
try {
- jtse.execute(-1, event);
+ jtse.execute(-1, null, event);
fail("test should throw an exception here");
} catch (Exception jtseException) {
assertEquals("execute-post: task selection logic failed on state \"NULL:0.0.0:NULL:NULL\"",
@@ -112,7 +112,7 @@ public class JrubyTaskSelectExecutorTest { try {
jtse.prepare();
- AxArtifactKey taskKey = jtse.execute(0, event);
+ AxArtifactKey taskKey = jtse.execute(0, null, event);
assertEquals("NULL:0.0.0", taskKey.getId());
jtse.cleanUp();
} catch (Exception jtseException) {
|