From 19ef8b24a98c09a349e6ae7309f535a0135463f6 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Fri, 21 Aug 2020 13:43:08 -0400 Subject: Make Actors event-agnostic Removed event and event-context code from the Actor code. Also removed the preprocessing steps from the Actor code, giving the application complete control over any preprocessing. Also fixed a bug wherein the APPC actor was treating the AAI_RESOURCE_VNF property as a String instead of as a GenericVnf. Issue-ID: POLICY-2746-actor Change-Id: Ibc05fe39ffedc0bc461abf10e6a960861ac70119 Signed-off-by: Jim Hahn --- .../actor/appclcm/AppcLcmOperationTest.java | 40 +--------------------- 1 file changed, 1 insertion(+), 39 deletions(-) (limited to 'models-interactions/model-actors/actor.appclcm/src/test') 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 startGuardAsync() { - return null; - } - }; + oper = new AppcLcmOperation(params, config); outcome = oper.start().get(); assertEquals(OperationResult.SUCCESS, outcome.getResult()); @@ -146,33 +135,6 @@ public class AppcLcmOperationTest extends BasicBidirectionalTopicOperation startGuardAsync() { - guardStarted.set(true); - return super.startGuardAsync(); - } - }; - - CompletableFuture 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); -- cgit 1.2.3-korg