aboutsummaryrefslogtreecommitdiffstats
path: root/runtime-acm/src/test/java
diff options
context:
space:
mode:
authorFrancescoFioraEst <francesco.fiora@est.tech>2024-06-21 16:19:38 +0100
committerFrancesco Fiora <francesco.fiora@est.tech>2024-06-24 11:51:54 +0000
commit96b0e2bd8b3180396c3198ef0b0f9445dc1af727 (patch)
tree6e50f3c8c06c7306759c248faca0762a0da23b6a /runtime-acm/src/test/java
parent98285f381934f8b419a2bb123ea4a084fdd7b540 (diff)
Fix registration flow
* set replicaId in RegisterAck message * ParticipantRegisterAckPublisher and ParticipantRegisterAckListener should be used with sync topic Issue-ID: POLICY-5060 Change-Id: I1292d636ea79055e902ec3d68108a28fbd80afdc Signed-off-by: FrancescoFioraEst <francesco.fiora@est.tech>
Diffstat (limited to 'runtime-acm/src/test/java')
-rw-r--r--runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionParticipantHandlerTest.java8
-rw-r--r--runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/supervision/comm/SupervisionMessagesTest.java2
2 files changed, 6 insertions, 4 deletions
diff --git a/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionParticipantHandlerTest.java b/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionParticipantHandlerTest.java
index bebaa3319..932529d79 100644
--- a/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionParticipantHandlerTest.java
+++ b/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionParticipantHandlerTest.java
@@ -104,7 +104,7 @@ class SupervisionParticipantHandlerTest {
verify(participantProvider).saveParticipant(any());
verify(participantRegisterAckPublisher).send(participantRegisterMessage.getMessageId(),
- CommonTestData.getParticipantId());
+ CommonTestData.getParticipantId(), null);
}
@Test
@@ -158,7 +158,8 @@ class SupervisionParticipantHandlerTest {
CommonTestData.getTestParamaterGroup());
handler.handleParticipantMessage(participantRegisterMessage);
- verify(participantRegisterAckPublisher).send(participantRegisterMessage.getMessageId(), participantId);
+ verify(participantRegisterAckPublisher)
+ .send(participantRegisterMessage.getMessageId(), participantId, participantId);
verify(acDefinitionProvider).updateAcDefinition(any(AutomationCompositionDefinition.class),
eq(CommonTestData.TOSCA_COMP_NAME));
verify(participantRestartPublisher).send(any(), any(AutomationCompositionDefinition.class), any());
@@ -216,7 +217,8 @@ class SupervisionParticipantHandlerTest {
CommonTestData.getTestParamaterGroup());
handler.handleParticipantMessage(participantRegisterMessage);
- verify(participantRegisterAckPublisher).send(participantRegisterMessage.getMessageId(), participantId);
+ verify(participantRegisterAckPublisher)
+ .send(participantRegisterMessage.getMessageId(), participantId, replicaId);
verify(acDefinitionProvider, times(0)).updateAcDefinition(any(AutomationCompositionDefinition.class),
eq(CommonTestData.TOSCA_COMP_NAME));
verify(participantSyncPublisher)
diff --git a/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/supervision/comm/SupervisionMessagesTest.java b/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/supervision/comm/SupervisionMessagesTest.java
index cab5adf9c..7cf0bf84f 100644
--- a/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/supervision/comm/SupervisionMessagesTest.java
+++ b/runtime-acm/src/test/java/org/onap/policy/clamp/acm/runtime/supervision/comm/SupervisionMessagesTest.java
@@ -200,7 +200,7 @@ class SupervisionMessagesTest {
var publisher = new ParticipantRegisterAckPublisher();
var topicSink = mock(TopicSink.class);
publisher.active(topicSink);
- publisher.send(UUID.randomUUID(), CommonTestData.getParticipantId());
+ publisher.send(UUID.randomUUID(), CommonTestData.getParticipantId(), CommonTestData.getReplicaId());
verify(topicSink).send(anyString());
}