diff options
author | rameshiyer27 <ramesh.murugan.iyer@est.tech> | 2024-06-11 11:23:44 +0100 |
---|---|---|
committer | rameshiyer27 <ramesh.murugan.iyer@est.tech> | 2024-06-11 13:46:56 +0100 |
commit | 5d48bd15e1d799ba4419a8b6d960a089335b9852 (patch) | |
tree | d13c4559267335c3cb91e3b05a34c5ae945a0fbe /participant/participant-impl/participant-impl-policy/src/test | |
parent | b174e37eb1a41e9997c9455edacc36667e0c5c1a (diff) |
Add Sync topic for participant Intermediary
Add new sync topic config for Intermediary
Add sync topic listener
Refactor IntermediaryActivator for processing multiple topic source
Issue-ID: POLICY-5030
Change-Id: Idce9839a85571a92048e589bd82ce33699add640
Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech>
Diffstat (limited to 'participant/participant-impl/participant-impl-policy/src/test')
-rw-r--r-- | participant/participant-impl/participant-impl-policy/src/test/java/org/onap/policy/clamp/acm/participant/policy/main/parameters/CommonTestData.java | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/participant/participant-impl/participant-impl-policy/src/test/java/org/onap/policy/clamp/acm/participant/policy/main/parameters/CommonTestData.java b/participant/participant-impl/participant-impl-policy/src/test/java/org/onap/policy/clamp/acm/participant/policy/main/parameters/CommonTestData.java index 3b2550db5..555383b42 100644 --- a/participant/participant-impl/participant-impl-policy/src/test/java/org/onap/policy/clamp/acm/participant/policy/main/parameters/CommonTestData.java +++ b/participant/participant-impl/participant-impl-policy/src/test/java/org/onap/policy/clamp/acm/participant/policy/main/parameters/CommonTestData.java @@ -1,6 +1,6 @@ /*- * ============LICENSE_START======================================================= - * Copyright (C) 2021-2023 Nordix Foundation. + * Copyright (C) 2021-2024 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,6 +25,7 @@ import java.util.List; import java.util.Map; import java.util.TreeMap; import java.util.UUID; +import org.onap.policy.clamp.acm.participant.intermediary.parameters.Topics; import org.onap.policy.common.endpoints.parameters.TopicParameters; import org.onap.policy.common.utils.coder.Coder; import org.onap.policy.common.utils.coder.CoderException; @@ -37,7 +38,8 @@ public class CommonTestData { public static final String PARTICIPANT_GROUP_NAME = "AutomationCompositionParticipantGroup"; public static final String DESCRIPTION = "Participant description"; public static final long TIME_INTERVAL = 2000; - public static final List<TopicParameters> TOPIC_PARAMS = List.of(getTopicParams()); + public static final List<TopicParameters> SINK_TOPIC_PARAMS = List.of(getSinkTopicParams()); + public static final List<TopicParameters> SOURCE_TOPIC_PARAMS = List.of(getSinkTopicParams(), getSyncTopicParams()); public static final Coder CODER = new StandardCoder(); @@ -124,6 +126,7 @@ public class CommonTestData { map.put("participantId", getParticipantId()); map.put("clampAutomationCompositionTopics", getTopicParametersMap(false)); map.put("participantSupportedElementTypes", new ArrayList<>()); + map.put("topics", new Topics("policy-acruntime-participant", "acm-ppnt-sync")); } return map; @@ -138,8 +141,8 @@ public class CommonTestData { public Map<String, Object> getTopicParametersMap(final boolean isEmpty) { final Map<String, Object> map = new TreeMap<>(); if (!isEmpty) { - map.put("topicSources", TOPIC_PARAMS); - map.put("topicSinks", TOPIC_PARAMS); + map.put("topicSources", SOURCE_TOPIC_PARAMS); + map.put("topicSinks", SINK_TOPIC_PARAMS); } return map; } @@ -149,7 +152,7 @@ public class CommonTestData { * * @return topic parameters */ - public static TopicParameters getTopicParams() { + public static TopicParameters getSinkTopicParams() { final TopicParameters topicParams = new TopicParameters(); topicParams.setTopic("policy-acruntime-participant"); topicParams.setTopicCommInfrastructure("NOOP"); @@ -158,6 +161,19 @@ public class CommonTestData { } /** + * Returns sync topic parameters for test cases. + * + * @return topic parameters + */ + public static TopicParameters getSyncTopicParams() { + final TopicParameters topicParams = new TopicParameters(); + topicParams.setTopic("acm-ppnt-sync"); + topicParams.setTopicCommInfrastructure("NOOP"); + topicParams.setServers(List.of("localhost")); + return topicParams; + } + + /** * Returns participantId for test cases. * * @return participant Id |