aboutsummaryrefslogtreecommitdiffstats
path: root/participant/participant-impl/participant-impl-simulator/src/test/java
diff options
context:
space:
mode:
authorrameshiyer27 <ramesh.murugan.iyer@est.tech>2024-06-11 11:23:44 +0100
committerrameshiyer27 <ramesh.murugan.iyer@est.tech>2024-06-11 13:46:56 +0100
commit5d48bd15e1d799ba4419a8b6d960a089335b9852 (patch)
treed13c4559267335c3cb91e3b05a34c5ae945a0fbe /participant/participant-impl/participant-impl-simulator/src/test/java
parentb174e37eb1a41e9997c9455edacc36667e0c5c1a (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-simulator/src/test/java')
-rw-r--r--participant/participant-impl/participant-impl-simulator/src/test/java/org/onap/policy/clamp/acm/participant/sim/comm/CommonTestData.java24
1 files changed, 20 insertions, 4 deletions
diff --git a/participant/participant-impl/participant-impl-simulator/src/test/java/org/onap/policy/clamp/acm/participant/sim/comm/CommonTestData.java b/participant/participant-impl/participant-impl-simulator/src/test/java/org/onap/policy/clamp/acm/participant/sim/comm/CommonTestData.java
index 54f193039..5499931a2 100644
--- a/participant/participant-impl/participant-impl-simulator/src/test/java/org/onap/policy/clamp/acm/participant/sim/comm/CommonTestData.java
+++ b/participant/participant-impl/participant-impl-simulator/src/test/java/org/onap/policy/clamp/acm/participant/sim/comm/CommonTestData.java
@@ -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.clamp.acm.participant.sim.parameters.ParticipantSimParameters;
import org.onap.policy.clamp.models.acm.concepts.AutomationComposition;
import org.onap.policy.clamp.models.acm.concepts.AutomationCompositionElement;
@@ -37,7 +38,8 @@ public class CommonTestData {
public static final Coder CODER = new StandardCoder();
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());
/**
* Get ParticipantSimParameters.
@@ -77,6 +79,7 @@ public class CommonTestData {
map.put("participantId", getParticipantId());
map.put("clampAutomationCompositionTopics", getTopicParametersMap());
map.put("participantSupportedElementTypes", new ArrayList<>());
+ map.put("topics", new Topics("policy-acruntime-participant", "acm-ppnt-sync"));
return map;
}
@@ -88,8 +91,8 @@ public class CommonTestData {
*/
private static Map<String, Object> getTopicParametersMap() {
final Map<String, Object> map = new TreeMap<>();
- map.put("topicSources", TOPIC_PARAMS);
- map.put("topicSinks", TOPIC_PARAMS);
+ map.put("topicSources", SOURCE_TOPIC_PARAMS);
+ map.put("topicSinks", SINK_TOPIC_PARAMS);
return map;
}
@@ -98,7 +101,7 @@ public class CommonTestData {
*
* @return topic parameters
*/
- private static TopicParameters getTopicParams() {
+ private static TopicParameters getSinkTopicParams() {
final TopicParameters topicParams = new TopicParameters();
topicParams.setTopic("policy-acruntime-participant");
topicParams.setTopicCommInfrastructure("NOOP");
@@ -107,6 +110,19 @@ public class CommonTestData {
}
/**
+ * Returns sync topic parameters for test cases.
+ *
+ * @return topic parameters
+ */
+ private 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