summaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors/actor.appclcm/src
diff options
context:
space:
mode:
Diffstat (limited to 'models-interactions/model-actors/actor.appclcm/src')
-rw-r--r--models-interactions/model-actors/actor.appclcm/src/main/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmOperation.java11
-rw-r--r--models-interactions/model-actors/actor.appclcm/src/test/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmOperationTest.java6
2 files changed, 11 insertions, 6 deletions
diff --git a/models-interactions/model-actors/actor.appclcm/src/main/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmOperation.java b/models-interactions/model-actors/actor.appclcm/src/main/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmOperation.java
index 0be723c7c..590bf1968 100644
--- a/models-interactions/model-actors/actor.appclcm/src/main/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmOperation.java
+++ b/models-interactions/model-actors/actor.appclcm/src/main/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmOperation.java
@@ -20,6 +20,7 @@
package org.onap.policy.controlloop.actor.appclcm;
+import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
@@ -32,7 +33,6 @@ import org.onap.policy.appclcm.AppcLcmOutput;
import org.onap.policy.appclcm.AppcLcmResponseCode;
import org.onap.policy.appclcm.AppcLcmResponseStatus;
import org.onap.policy.common.utils.coder.CoderException;
-import org.onap.policy.controlloop.VirtualControlLoopEvent;
import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome;
import org.onap.policy.controlloop.actorserviceprovider.impl.BidirectionalTopicOperation;
import org.onap.policy.controlloop.actorserviceprovider.parameters.BidirectionalTopicConfig;
@@ -62,7 +62,7 @@ public class AppcLcmOperation extends BidirectionalTopicOperation<AppcLcmDmaapWr
* @param config configuration for this operation
*/
public AppcLcmOperation(ControlLoopOperationParams params, BidirectionalTopicConfig config) {
- super(params, config, AppcLcmDmaapWrapper.class);
+ super(params, config, AppcLcmDmaapWrapper.class, Collections.emptyList());
if (StringUtils.isBlank(params.getTargetEntity())) {
throw new IllegalArgumentException("missing targetEntity");
@@ -80,12 +80,11 @@ public class AppcLcmOperation extends BidirectionalTopicOperation<AppcLcmDmaapWr
@Override
protected AppcLcmDmaapWrapper makeRequest(int attempt) {
- VirtualControlLoopEvent onset = params.getContext().getEvent();
String subRequestId = getSubRequestId();
AppcLcmCommonHeader header = new AppcLcmCommonHeader();
- header.setOriginatorId(onset.getRequestId().toString());
- header.setRequestId(onset.getRequestId());
+ header.setOriginatorId(params.getRequestId().toString());
+ header.setRequestId(params.getRequestId());
header.setSubRequestId(subRequestId);
AppcLcmInput inputRequest = new AppcLcmInput();
@@ -118,7 +117,7 @@ public class AppcLcmOperation extends BidirectionalTopicOperation<AppcLcmDmaapWr
AppcLcmDmaapWrapper dmaapRequest = new AppcLcmDmaapWrapper();
dmaapRequest.setBody(body);
dmaapRequest.setVersion("2.0");
- dmaapRequest.setCorrelationId(onset.getRequestId() + "-" + subRequestId);
+ dmaapRequest.setCorrelationId(params.getRequestId() + "-" + subRequestId);
dmaapRequest.setRpcName(recipeFormatter.getUrlRecipe());
dmaapRequest.setType("request");
diff --git a/models-interactions/model-actors/actor.appclcm/src/test/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmOperationTest.java b/models-interactions/model-actors/actor.appclcm/src/test/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmOperationTest.java
index 6059cb5ed..705fd105f 100644
--- a/models-interactions/model-actors/actor.appclcm/src/test/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmOperationTest.java
+++ b/models-interactions/model-actors/actor.appclcm/src/test/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmOperationTest.java
@@ -20,6 +20,7 @@
package org.onap.policy.controlloop.actor.appclcm;
+import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@@ -142,6 +143,11 @@ public class AppcLcmOperationTest extends BasicBidirectionalTopicOperation<AppcL
}
@Test
+ public void testGetPropertyNames() {
+ assertThat(oper.getPropertyNames()).isEmpty();
+ }
+
+ @Test
public void testStartPreprocessorAsync() throws Exception {
context = mock(ControlLoopEventContext.class);
when(context.getEvent()).thenReturn(event);