diff options
author | Pamela Dragosh <pdragosh@research.att.com> | 2020-08-27 08:44:12 -0400 |
---|---|---|
committer | Pamela Dragosh <pdragosh@research.att.com> | 2020-08-27 14:29:09 -0400 |
commit | f456cc5c8e1efd15edb6da718e1428d8fd7c66c5 (patch) | |
tree | b7b4ba3fc6255b056e00f6e203d7ec8fd6a7c194 /models-interactions/model-actors/actor.sdnr/src/test | |
parent | 68a60a45f27287a4a523c82ef466cbeec655f641 (diff) |
Remove Target and TargetType
The dependency should have been removed in the last review to
remove SDC and policy-yaml legacy code.
It was revealed that usage of TargetType and Type were spread out over the
actor code. Those fields are represented differently in the new
TOSCA Operational Policy Type, so fields were created to capture
those values to be used by actor code.
Issue-ID: POLICY-2428
Change-Id: Ib783526a518ca7942ae9e38019bd343639f4dd98
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'models-interactions/model-actors/actor.sdnr/src/test')
2 files changed, 8 insertions, 7 deletions
diff --git a/models-interactions/model-actors/actor.sdnr/src/test/java/org/onap/policy/controlloop/actor/sdnr/BasicSdnrOperation.java b/models-interactions/model-actors/actor.sdnr/src/test/java/org/onap/policy/controlloop/actor/sdnr/BasicSdnrOperation.java index 385052fec..912d27316 100644 --- a/models-interactions/model-actors/actor.sdnr/src/test/java/org/onap/policy/controlloop/actor/sdnr/BasicSdnrOperation.java +++ b/models-interactions/model-actors/actor.sdnr/src/test/java/org/onap/policy/controlloop/actor/sdnr/BasicSdnrOperation.java @@ -36,10 +36,10 @@ import org.onap.policy.common.endpoints.event.comm.TopicSource; import org.onap.policy.common.utils.coder.StandardCoderObject; import org.onap.policy.controlloop.actor.test.BasicBidirectionalTopicOperation; import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome; +import org.onap.policy.controlloop.actorserviceprovider.OperationResult; import org.onap.policy.controlloop.actorserviceprovider.Util; import org.onap.policy.controlloop.actorserviceprovider.impl.OperationMaker; import org.onap.policy.controlloop.actorserviceprovider.parameters.BidirectionalTopicConfig; -import org.onap.policy.controlloop.policy.PolicyResult; import org.onap.policy.sdnr.PciBody; import org.onap.policy.sdnr.PciMessage; import org.onap.policy.sdnr.PciResponse; @@ -94,6 +94,7 @@ public abstract class BasicSdnrOperation extends BasicBidirectionalTopicOperatio super.tearDownBasic(); } + @Override protected TopicServer<PciMessage> makeServer(TopicSink sink, TopicSource source) { return new SdnrTopicServer(sink, source); } @@ -117,7 +118,7 @@ public abstract class BasicSdnrOperation extends BasicBidirectionalTopicOperatio assertTrue(future2.isDone()); outcome = future2.get(); - assertEquals(PolicyResult.SUCCESS, outcome.getResult()); + assertEquals(OperationResult.SUCCESS, outcome.getResult()); } /** diff --git a/models-interactions/model-actors/actor.sdnr/src/test/java/org/onap/policy/controlloop/actor/sdnr/SdnrOperationTest.java b/models-interactions/model-actors/actor.sdnr/src/test/java/org/onap/policy/controlloop/actor/sdnr/SdnrOperationTest.java index 7537fa267..90452a9af 100644 --- a/models-interactions/model-actors/actor.sdnr/src/test/java/org/onap/policy/controlloop/actor/sdnr/SdnrOperationTest.java +++ b/models-interactions/model-actors/actor.sdnr/src/test/java/org/onap/policy/controlloop/actor/sdnr/SdnrOperationTest.java @@ -42,11 +42,11 @@ import org.junit.Test; 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; -import org.onap.policy.controlloop.policy.PolicyResult; import org.onap.policy.sdnr.PciCommonHeader; import org.onap.policy.sdnr.PciMessage; import org.onap.policy.sdnr.PciRequest; @@ -142,7 +142,7 @@ public class SdnrOperationTest extends BasicSdnrOperation { }; outcome = operation.start().get(); - assertEquals(PolicyResult.SUCCESS, outcome.getResult()); + assertEquals(OperationResult.SUCCESS, outcome.getResult()); assertTrue(outcome.getResponse() instanceof PciMessage); } @@ -171,7 +171,7 @@ public class SdnrOperationTest extends BasicSdnrOperation { future2.complete(params.makeOutcome(null)); assertTrue(executor.runAll(100)); assertTrue(future3.isDone()); - assertEquals(PolicyResult.SUCCESS, future3.get().getResult()); + assertEquals(OperationResult.SUCCESS, future3.get().getResult()); } @Test @@ -255,8 +255,8 @@ public class SdnrOperationTest extends BasicSdnrOperation { } protected void checkOutcome() { - assertSame(outcome, operation.setOutcome(outcome, PolicyResult.SUCCESS, response)); - assertEquals(PolicyResult.SUCCESS, outcome.getResult()); + assertSame(outcome, operation.setOutcome(outcome, OperationResult.SUCCESS, response)); + assertEquals(OperationResult.SUCCESS, outcome.getResult()); assertNotNull(outcome.getMessage()); assertSame(response, outcome.getResponse()); } |