summaryrefslogtreecommitdiffstats
path: root/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-kafka
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2019-07-10 19:44:39 +0000
committerliamfallon <liam.fallon@est.tech>2019-07-10 19:44:39 +0000
commitadf67497761295115dc75b525500d687518fc4fd (patch)
treec5c5b5e737ac08256e9f782b5dccbd3ddc08d3c3 /plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-kafka
parent5c384fb2888029c2babb859c30318749e1ce828c (diff)
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 <liam.fallon@est.tech>
Diffstat (limited to 'plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-kafka')
-rw-r--r--plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-kafka/src/main/java/org/onap/policy/apex/plugins/event/carrier/kafka/ApexKafkaConsumer.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-kafka/src/main/java/org/onap/policy/apex/plugins/event/carrier/kafka/ApexKafkaConsumer.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-kafka/src/main/java/org/onap/policy/apex/plugins/event/carrier/kafka/ApexKafkaConsumer.java
index 8df8e6117..787ac4ef5 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-kafka/src/main/java/org/onap/policy/apex/plugins/event/carrier/kafka/ApexKafkaConsumer.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-kafka/src/main/java/org/onap/policy/apex/plugins/event/carrier/kafka/ApexKafkaConsumer.java
@@ -22,6 +22,7 @@ package org.onap.policy.apex.plugins.event.carrier.kafka;
import java.util.EnumMap;
import java.util.Map;
+import java.util.Properties;
import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.apache.kafka.clients.consumer.ConsumerRecords;
@@ -151,7 +152,7 @@ public class ApexKafkaConsumer implements ApexEventConsumer, Runnable {
kafkaConsumer.poll(kafkaConsumerProperties.getConsumerPollDuration().toMillis());
for (final ConsumerRecord<String, String> record : records) {
traceIfTraceEnabled(record);
- eventReceiver.receiveEvent(null, record.value());
+ eventReceiver.receiveEvent(new Properties(), record.value());
}
} catch (final Exception e) {
LOGGER.warn("error receiving events on thread {}", consumerThread.getName(), e);