diff options
Diffstat (limited to 'models-interactions/model-actors/actor.sdnr/src')
3 files changed, 10 insertions, 9 deletions
diff --git a/models-interactions/model-actors/actor.sdnr/src/main/java/org/onap/policy/controlloop/actor/sdnr/SdnrOperation.java b/models-interactions/model-actors/actor.sdnr/src/main/java/org/onap/policy/controlloop/actor/sdnr/SdnrOperation.java index 4511cc3c5..308ddd9bd 100644 --- a/models-interactions/model-actors/actor.sdnr/src/main/java/org/onap/policy/controlloop/actor/sdnr/SdnrOperation.java +++ b/models-interactions/model-actors/actor.sdnr/src/main/java/org/onap/policy/controlloop/actor/sdnr/SdnrOperation.java @@ -24,11 +24,11 @@ import java.util.List; import java.util.concurrent.CompletableFuture; 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.impl.BidirectionalTopicOperation; import org.onap.policy.controlloop.actorserviceprovider.parameters.BidirectionalTopicConfig; import org.onap.policy.controlloop.actorserviceprovider.parameters.ControlLoopOperationParams; import org.onap.policy.controlloop.actorserviceprovider.topic.SelectorKey; -import org.onap.policy.controlloop.policy.PolicyResult; import org.onap.policy.sdnr.PciBody; import org.onap.policy.sdnr.PciCommonHeader; import org.onap.policy.sdnr.PciMessage; @@ -118,7 +118,7 @@ public class SdnrOperation extends BidirectionalTopicOperation<PciMessage, PciMe * Sets the message to the status description, if available. */ @Override - public OperationOutcome setOutcome(OperationOutcome outcome, PolicyResult result, PciMessage responseWrapper) { + public OperationOutcome setOutcome(OperationOutcome outcome, OperationResult result, PciMessage responseWrapper) { outcome.setResponse(responseWrapper); if (responseWrapper.getBody() == null || responseWrapper.getBody().getOutput() == null) { 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()); } |