From adf67497761295115dc75b525500d687518fc4fd Mon Sep 17 00:00:00 2001 From: liamfallon Date: Wed, 10 Jul 2019 19:44:39 +0000 Subject: Add integration tests for executor properties Added integration test that sets properties in a dummy plugin and amends them in tasks in a policy. Variosu tests added to check combinations of where properties are set in plugins or in tasks or both. Implementaiton changed to: - Always pass in a Properies object, the properties object coming into the policy cannot be null because the task/TSL/SFL may wish to set it - Fix a bug where the properties were not passed from the ApexEvent to the engine event in the ApexEventUnmarshaller class Issue-ID: POLICY-1743 Change-Id: I6aa152b28d46cf3cc6fa56a1a95b76a8e55f5a49 Signed-off-by: liamfallon --- .../apex/plugins/event/carrier/websocket/ApexWebSocketConsumer.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-websocket/src/main/java/org') diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-websocket/src/main/java/org/onap/policy/apex/plugins/event/carrier/websocket/ApexWebSocketConsumer.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-websocket/src/main/java/org/onap/policy/apex/plugins/event/carrier/websocket/ApexWebSocketConsumer.java index 87a88714e..3cf44806a 100644 --- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-websocket/src/main/java/org/onap/policy/apex/plugins/event/carrier/websocket/ApexWebSocketConsumer.java +++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-websocket/src/main/java/org/onap/policy/apex/plugins/event/carrier/websocket/ApexWebSocketConsumer.java @@ -22,6 +22,7 @@ package org.onap.policy.apex.plugins.event.carrier.websocket; import java.util.EnumMap; import java.util.Map; +import java.util.Properties; import org.onap.policy.apex.core.infrastructure.messaging.MessagingException; import org.onap.policy.apex.core.infrastructure.messaging.stringmessaging.WsStringMessageClient; @@ -165,7 +166,7 @@ public class ApexWebSocketConsumer implements ApexEventConsumer, WsStringMessage @Override public void receiveString(final String eventString) { try { - eventReceiver.receiveEvent(null, eventString); + eventReceiver.receiveEvent(new Properties(), eventString); eventsRead++; } catch (final Exception e) { final String errorMessage = "Error sending event " + name + '_' + eventsRead + ", " + e.getMessage() -- cgit 1.2.3-korg