summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/comm/ParticipantRegisterAckListener.java5
-rw-r--r--runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionParticipantHandler.java2
-rw-r--r--runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/supervision/comm/ParticipantRegisterAckPublisher.java9
-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
5 files changed, 20 insertions, 6 deletions
diff --git a/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/comm/ParticipantRegisterAckListener.java b/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/comm/ParticipantRegisterAckListener.java
index 544e66fe4..8b8192e3a 100644
--- a/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/comm/ParticipantRegisterAckListener.java
+++ b/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/comm/ParticipantRegisterAckListener.java
@@ -45,4 +45,9 @@ public class ParticipantRegisterAckListener extends ParticipantAckListener<Parti
public String getType() {
return ParticipantMessageType.PARTICIPANT_REGISTER_ACK.name();
}
+
+ @Override
+ public boolean isDefaultTopic() {
+ return false;
+ }
}
diff --git a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionParticipantHandler.java b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionParticipantHandler.java
index 4c8c5815c..3c93a3571 100644
--- a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionParticipantHandler.java
+++ b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/supervision/SupervisionParticipantHandler.java
@@ -81,7 +81,7 @@ public class SupervisionParticipantHandler {
participantRegisterMsg.getParticipantSupportedElementType(), true);
participantRegisterAckPublisher.send(participantRegisterMsg.getMessageId(),
- participantRegisterMsg.getParticipantId());
+ participantRegisterMsg.getParticipantId(), participantRegisterMsg.getReplicaId());
}
/**
diff --git a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/supervision/comm/ParticipantRegisterAckPublisher.java b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/supervision/comm/ParticipantRegisterAckPublisher.java
index d021c57a4..5e073080b 100644
--- a/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/supervision/comm/ParticipantRegisterAckPublisher.java
+++ b/runtime-acm/src/main/java/org/onap/policy/clamp/acm/runtime/supervision/comm/ParticipantRegisterAckPublisher.java
@@ -36,14 +36,21 @@ public class ParticipantRegisterAckPublisher extends AbstractParticipantAckPubli
*
* @param responseTo the original request id in the request.
* @param participantId the participant Id
+ * @param replicaId the participant replica Id
*/
@Timed(value = "publisher.participant_register_ack", description = "PARTICIPANT_REGISTER_ACK messages published")
- public void send(UUID responseTo, UUID participantId) {
+ public void send(UUID responseTo, UUID participantId, UUID replicaId) {
var message = new ParticipantRegisterAck();
message.setParticipantId(participantId);
+ message.setReplicaId(replicaId);
message.setResponseTo(responseTo);
message.setMessage("Participant Register Ack");
message.setResult(true);
super.send(message);
}
+
+ @Override
+ public boolean isDefaultTopic() {
+ return false;
+ }
}
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());
}