diff options
author | saul.gill <saul.gill@est.tech> | 2023-02-15 12:39:43 +0000 |
---|---|---|
committer | saul.gill <saul.gill@est.tech> | 2023-02-15 12:55:23 +0000 |
commit | a85118152983dbc53ce1d0e14712bc66c4177f65 (patch) | |
tree | 5202356c6fb39b4bbb2f78e22c1f26de92eac04a /runtime-acm/src | |
parent | 06339bee0cf891144ca781983ba99d170b10b2b7 (diff) |
Add undeploy on deregister (acm-side)
State of Ac Elements associated with participant changed on deregister
Issue-ID: POLICY-4499
Change-Id: I54265c13deebd77d654fb843a33f7267d4276b76
Signed-off-by: saul.gill <saul.gill@est.tech>
Diffstat (limited to 'runtime-acm/src')
2 files changed, 2 insertions, 0 deletions
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 75fed71e0..6cf75ccb6 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 @@ -83,6 +83,7 @@ public class SupervisionParticipantHandler { var participant = participantOpt.get(); participant.setParticipantState(ParticipantState.OFF_LINE); participantProvider.updateParticipant(participant); + participantProvider.resetParticipantAcElementState(participant.getParticipantId()); } participantDeregisterAckPublisher.send(participantDeregisterMsg.getMessageId()); 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 f47e2372a..246ba7dc7 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 @@ -57,6 +57,7 @@ class SupervisionParticipantHandlerTest { handler.handleParticipantMessage(participantDeregisterMessage); verify(participantProvider).updateParticipant(any()); + verify(participantProvider).resetParticipantAcElementState(any()); verify(participantDeregisterAckPublisher).send(participantDeregisterMessage.getMessageId()); } |