summaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors/actor.sdnc/src/test/java/org/onap
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2020-02-20 19:08:55 -0500
committerJim Hahn <jrh3@att.com>2020-02-21 20:33:06 -0500
commit7f69c5ca0a6f6018166f8fee3e811edf4dee1eb8 (patch)
treee57ab3105adbe0752b30e0e0a60ea43588cfb384 /models-interactions/model-actors/actor.sdnc/src/test/java/org/onap
parent3c8c5b2994e3f132385f0341283bc271e13cdb25 (diff)
Change payload to Map<String,Object> so it's more versatile
This was supposed to be two separate commits, but I goofed something. Added guard query to Operation superclass. Modified VfModuleCreate to store the VF count, pass it to the guard, and bump it once the create completes successfully. Added code to check Actors for proper plug-in to ActorService. Renamed "operation" property to "operations", to be more consistent with other parameters (e.g., TopicParameterGroup). The META-INF/services files for the actors had mixed case, which did not match the package name of the Actor class, preventing the ServiceLoader from recognizing them. Also modified the ActorService to skip any that cannot actually be loaded, for whatever reason (e.g., not in the classpath). Issue-ID: POLICY-1625 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: Ifa97744543f2866cc553138ec5ec644b033de780
Diffstat (limited to 'models-interactions/model-actors/actor.sdnc/src/test/java/org/onap')
-rw-r--r--models-interactions/model-actors/actor.sdnc/src/test/java/org/onap/policy/controlloop/actor/sdnc/SdncActorServiceProviderTest.java6
-rw-r--r--models-interactions/model-actors/actor.sdnc/src/test/java/org/onap/policy/controlloop/actor/sdnc/SdncOperationTest.java6
2 files changed, 11 insertions, 1 deletions
diff --git a/models-interactions/model-actors/actor.sdnc/src/test/java/org/onap/policy/controlloop/actor/sdnc/SdncActorServiceProviderTest.java b/models-interactions/model-actors/actor.sdnc/src/test/java/org/onap/policy/controlloop/actor/sdnc/SdncActorServiceProviderTest.java
index ac81d49c9..752cb9125 100644
--- a/models-interactions/model-actors/actor.sdnc/src/test/java/org/onap/policy/controlloop/actor/sdnc/SdncActorServiceProviderTest.java
+++ b/models-interactions/model-actors/actor.sdnc/src/test/java/org/onap/policy/controlloop/actor/sdnc/SdncActorServiceProviderTest.java
@@ -36,10 +36,11 @@ import org.junit.Test;
import org.onap.policy.common.endpoints.http.server.HttpServletServerFactoryInstance;
import org.onap.policy.controlloop.ControlLoopOperation;
import org.onap.policy.controlloop.VirtualControlLoopEvent;
+import org.onap.policy.controlloop.actor.test.BasicActor;
import org.onap.policy.controlloop.policy.Policy;
import org.onap.policy.sdnc.SdncRequest;
-public class SdncActorServiceProviderTest {
+public class SdncActorServiceProviderTest extends BasicActor {
private static final String REROUTE = RerouteOperation.NAME;
@@ -68,6 +69,9 @@ public class SdncActorServiceProviderTest {
var actual = prov.getOperationNames().stream().sorted().collect(Collectors.toList());
assertEquals(expected.toString(), actual.toString());
+
+ // verify that it all plugs into the ActorService
+ verifyActorService(SdncActorServiceProvider.NAME, "service.yaml");
}
@Test
diff --git a/models-interactions/model-actors/actor.sdnc/src/test/java/org/onap/policy/controlloop/actor/sdnc/SdncOperationTest.java b/models-interactions/model-actors/actor.sdnc/src/test/java/org/onap/policy/controlloop/actor/sdnc/SdncOperationTest.java
index b87ed2c80..b7f71715c 100644
--- a/models-interactions/model-actors/actor.sdnc/src/test/java/org/onap/policy/controlloop/actor/sdnc/SdncOperationTest.java
+++ b/models-interactions/model-actors/actor.sdnc/src/test/java/org/onap/policy/controlloop/actor/sdnc/SdncOperationTest.java
@@ -22,6 +22,7 @@ package org.onap.policy.controlloop.actor.sdnc;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import java.util.Map;
@@ -57,6 +58,11 @@ public class SdncOperationTest extends BasicSdncOperation {
}
@Test
+ public void testStartPreprocessorAsync() {
+ assertNotNull(oper.startPreprocessorAsync());
+ }
+
+ @Test
public void testStartOperationAsync_testStartRequestAsync() throws Exception {
verifyOperation(oper);
}