summaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors/actor.appclcm
diff options
context:
space:
mode:
Diffstat (limited to 'models-interactions/model-actors/actor.appclcm')
-rw-r--r--models-interactions/model-actors/actor.appclcm/src/main/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmOperation.java10
-rw-r--r--models-interactions/model-actors/actor.appclcm/src/test/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmOperationTest.java40
2 files changed, 1 insertions, 49 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 1d687cded..303067dde 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
@@ -22,7 +22,6 @@ package org.onap.policy.controlloop.actor.appclcm;
import java.util.List;
import java.util.Map;
-import java.util.concurrent.CompletableFuture;
import org.onap.policy.appclcm.AppcLcmBody;
import org.onap.policy.appclcm.AppcLcmCommonHeader;
import org.onap.policy.appclcm.AppcLcmDmaapWrapper;
@@ -66,15 +65,6 @@ public class AppcLcmOperation extends BidirectionalTopicOperation<AppcLcmDmaapWr
super(params, config, AppcLcmDmaapWrapper.class, PROPERTY_NAMES);
}
- /**
- * Ensures that A&AI customer query has been performed, and then runs the guard query.
- * Starts the GUARD using startGuardAsync.
- */
- @Override
- protected CompletableFuture<OperationOutcome> startPreprocessorAsync() {
- return startGuardAsync();
- }
-
@Override
protected AppcLcmDmaapWrapper makeRequest(int attempt) {
String subRequestId = getSubRequestId();
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 e707ea942..650c5da99 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
@@ -28,16 +28,12 @@ import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
-import java.util.concurrent.CompletableFuture;
-import java.util.concurrent.atomic.AtomicBoolean;
import java.util.stream.Collectors;
import org.junit.After;
import org.junit.AfterClass;
@@ -56,10 +52,8 @@ import org.onap.policy.common.utils.coder.CoderException;
import org.onap.policy.common.utils.coder.StandardCoder;
import org.onap.policy.controlloop.ControlLoopOperation;
import org.onap.policy.controlloop.actor.test.BasicBidirectionalTopicOperation;
-import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome;
import org.onap.policy.controlloop.actorserviceprovider.OperationProperties;
import org.onap.policy.controlloop.actorserviceprovider.OperationResult;
-import org.onap.policy.controlloop.actorserviceprovider.controlloop.ControlLoopEventContext;
import org.onap.policy.controlloop.actorserviceprovider.impl.BidirectionalTopicOperation.Status;
import org.onap.policy.controlloop.actorserviceprovider.parameters.BidirectionalTopicConfig;
import org.onap.policy.controlloop.actorserviceprovider.parameters.BidirectionalTopicParams;
@@ -123,12 +117,7 @@ public class AppcLcmOperationTest extends BasicBidirectionalTopicOperation<AppcL
params = params.toBuilder().retry(0).timeoutSec(5).executor(blockingExecutor).build();
- oper = new AppcLcmOperation(params, config) {
- @Override
- protected CompletableFuture<OperationOutcome> startGuardAsync() {
- return null;
- }
- };
+ oper = new AppcLcmOperation(params, config);
outcome = oper.start().get();
assertEquals(OperationResult.SUCCESS, outcome.getResult());
@@ -147,33 +136,6 @@ public class AppcLcmOperationTest extends BasicBidirectionalTopicOperation<AppcL
}
@Test
- public void testStartPreprocessorAsync() throws Exception {
- context = mock(ControlLoopEventContext.class);
- when(context.getEvent()).thenReturn(event);
- params = params.toBuilder().context(context).build();
-
- AtomicBoolean guardStarted = new AtomicBoolean();
-
- oper = new AppcLcmOperation(params, config) {
- @Override
- protected CompletableFuture<OperationOutcome> startGuardAsync() {
- guardStarted.set(true);
- return super.startGuardAsync();
- }
- };
-
- CompletableFuture<OperationOutcome> future2 = oper.startPreprocessorAsync();
- assertNotNull(future2);
- assertFalse(future.isDone());
- assertTrue(guardStarted.get());
-
- assertTrue(executor.runAll(100));
- assertTrue(future2.isDone());
- outcome = future2.get();
- assertEquals(OperationResult.SUCCESS, outcome.getResult());
- }
-
- @Test
public void testMakeRequest() {
oper.generateSubRequestId(2);
String subreq = oper.getSubRequestId();