diff options
author | FrancescoFioraEst <francesco.fiora@est.tech> | 2024-06-25 13:39:45 +0100 |
---|---|---|
committer | Francesco Fiora <francesco.fiora@est.tech> | 2024-06-25 15:32:32 +0000 |
commit | 56b2759cee1931b3d3fb2da5197e47c32982cd19 (patch) | |
tree | 791062c70f409dda5ce75f948f502bd44daecd27 /participant | |
parent | 96b0e2bd8b3180396c3198ef0b0f9445dc1af727 (diff) |
Send ParticipantStatusReq message using sync topic
Send ParticipantStatusReq message to all replicas using sync topic.
Issue-ID: POLICY-5061
Change-Id: I8a104df38a48efef8a8b4eb61f9a944f7434d0a3
Signed-off-by: FrancescoFioraEst <francesco.fiora@est.tech>
Diffstat (limited to 'participant')
2 files changed, 10 insertions, 0 deletions
diff --git a/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/comm/ParticipantStatusReqListener.java b/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/comm/ParticipantStatusReqListener.java index ec3e568e3..12ff57217 100644 --- a/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/comm/ParticipantStatusReqListener.java +++ b/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/comm/ParticipantStatusReqListener.java @@ -44,4 +44,9 @@ public class ParticipantStatusReqListener extends ParticipantListener<Participan public String getType() { return ParticipantMessageType.PARTICIPANT_STATUS_REQ.name(); } + + @Override + public boolean isDefaultTopic() { + return false; + } } diff --git a/participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/comm/ParticipantCommTest.java b/participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/comm/ParticipantCommTest.java index cfc5c6f30..eaf89ec51 100644 --- a/participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/comm/ParticipantCommTest.java +++ b/participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/comm/ParticipantCommTest.java @@ -24,6 +24,7 @@ import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.mock; import java.util.Collections; @@ -52,12 +53,14 @@ class ParticipantCommTest { var participantRegisterAckListener = new ParticipantRegisterAckListener(participantHandler); participantRegisterAckListener.onTopicEvent(null, null, null, new ParticipantRegisterAck()); assertEquals(ParticipantMessageType.PARTICIPANT_REGISTER_ACK.name(), participantRegisterAckListener.getType()); + assertFalse(participantRegisterAckListener.isDefaultTopic()); assertEquals(participantRegisterAckListener, participantRegisterAckListener.getScoListener()); var participantStatusReqListener = new ParticipantStatusReqListener(participantHandler); participantStatusReqListener.onTopicEvent(null, null, null, new ParticipantStatusReq()); assertEquals(ParticipantMessageType.PARTICIPANT_STATUS_REQ.name(), participantStatusReqListener.getType()); assertEquals(participantStatusReqListener, participantStatusReqListener.getScoListener()); + assertFalse(participantStatusReqListener.isDefaultTopic()); var participantDeregisterAckListener = new ParticipantDeregisterAckListener(participantHandler); assertEquals(ParticipantMessageType.PARTICIPANT_DEREGISTER_ACK.name(), @@ -65,6 +68,7 @@ class ParticipantCommTest { var participantPrimeListener = new ParticipantPrimeListener(participantHandler); assertEquals(ParticipantMessageType.PARTICIPANT_PRIME.name(), participantPrimeListener.getType()); + assertTrue(participantPrimeListener.isDefaultTopic()); var acPropertyUpdateListener = new AcPropertyUpdateListener(participantHandler); assertEquals(ParticipantMessageType.PROPERTIES_UPDATE.name(), acPropertyUpdateListener.getType()); @@ -80,6 +84,7 @@ class ParticipantCommTest { var participantSyncListener = new ParticipantSyncListener(participantHandler); assertEquals(ParticipantMessageType.PARTICIPANT_SYNC_MSG.name(), participantSyncListener.getType()); + assertFalse(participantSyncListener.isDefaultTopic()); var acMigrationListener = new AutomationCompositionMigrationListener(participantHandler); assertEquals(ParticipantMessageType.AUTOMATION_COMPOSITION_MIGRATION.name(), acMigrationListener.getType()); |