aboutsummaryrefslogtreecommitdiffstats
path: root/participant/participant-intermediary/src/test/java
diff options
context:
space:
mode:
authorFrancescoFioraEst <francesco.fiora@est.tech>2023-12-14 17:33:57 +0000
committerFrancesco Fiora <francesco.fiora@est.tech>2024-03-08 16:14:43 +0000
commitb75038fab6ae0816413ed9f925639f3befe4fddb (patch)
treeb6867f9a3be4f7aacaa2eaa2a7d1440097ac87e7 /participant/participant-intermediary/src/test/java
parent33751b41710ad0b31ee3b4aa8346591d5ecb36ad (diff)
Update compositions and instances monitoring
Improved performance scanning only compositions and instances that are in transition. Issue-ID: POLICY-4906 Change-Id: I7a849e921f1d97509f67ff624c715c893a1432ab Signed-off-by: FrancescoFioraEst <francesco.fiora@est.tech>
Diffstat (limited to 'participant/participant-intermediary/src/test/java')
-rw-r--r--participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/handler/AutomationCompositionHandlerTest.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/handler/AutomationCompositionHandlerTest.java b/participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/handler/AutomationCompositionHandlerTest.java
index 661c009f6..b8fd3b42d 100644
--- a/participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/handler/AutomationCompositionHandlerTest.java
+++ b/participant/participant-intermediary/src/test/java/org/onap/policy/clamp/acm/participant/intermediary/handler/AutomationCompositionHandlerTest.java
@@ -47,6 +47,7 @@ import org.onap.policy.clamp.models.acm.messages.kafka.participant.AutomationCom
import org.onap.policy.clamp.models.acm.messages.kafka.participant.AutomationCompositionDeployAck;
import org.onap.policy.clamp.models.acm.messages.kafka.participant.AutomationCompositionMigration;
import org.onap.policy.clamp.models.acm.messages.kafka.participant.AutomationCompositionStateChange;
+import org.onap.policy.clamp.models.acm.messages.kafka.participant.ParticipantPrimeAck;
import org.onap.policy.clamp.models.acm.messages.kafka.participant.PropertiesUpdate;
import org.onap.policy.clamp.models.acm.messages.rest.instantiation.DeployOrder;
import org.onap.policy.clamp.models.acm.messages.rest.instantiation.LockOrder;
@@ -273,7 +274,7 @@ class AutomationCompositionHandlerTest {
}
@Test
- void handleComposiotDeprimeTest() {
+ void handleCompositionDeprimeTest() {
var acElementDefinition = new AutomationCompositionElementDefinition();
acElementDefinition.setAcElementDefinitionId(new ToscaConceptIdentifier("key", "1.0.0"));
var toscaNodeTemplate = new ToscaNodeTemplate();
@@ -292,6 +293,17 @@ class AutomationCompositionHandlerTest {
}
@Test
+ void handleCompositionAlreadyDeprimedTest() {
+ var messageId = UUID.randomUUID();
+ var compositionId = UUID.randomUUID();
+ var participantMessagePublisher = mock(ParticipantMessagePublisher.class);
+ var ach = new AutomationCompositionHandler(mock(CacheProvider.class), participantMessagePublisher,
+ mock(ThreadHandler.class));
+ ach.deprime(messageId, compositionId);
+ verify(participantMessagePublisher).sendParticipantPrimeAck(any(ParticipantPrimeAck.class));
+ }
+
+ @Test
void restartedTest() {
var acElementDefinition = new AutomationCompositionElementDefinition();
acElementDefinition.setAcElementDefinitionId(new ToscaConceptIdentifier("key", "1.0.0"));