diff options
author | 2019-10-23 18:18:07 -0500 | |
---|---|---|
committer | 2019-10-29 13:53:48 +0000 | |
commit | 25628c56e5fc6b1d6e2e3b761f435fc9596ce1b3 (patch) | |
tree | 743e0d540f3ff9a7630caeb74da95b9d874d4ea5 /controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopFailureTest.java | |
parent | 1be8ef842916c239ab840cf1d22b3c7d017363cd (diff) |
Update APPC LCM Model references
Updates to all references of APPC LCM model code
based on changes in policy models for APPC LCM.
Issue-ID: POLICY-2043
Change-Id: I0102eb27f449578636cfc0bf22124fa863f05724
Signed-off-by: Daniel Cruz <dc443y@att.com>
Diffstat (limited to 'controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopFailureTest.java')
-rw-r--r-- | controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopFailureTest.java | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopFailureTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopFailureTest.java index db5da1e4a..1647fa0e1 100644 --- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopFailureTest.java +++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopFailureTest.java @@ -30,10 +30,10 @@ import java.util.HashMap; import java.util.UUID; import org.junit.BeforeClass; import org.junit.Test; -import org.onap.policy.appclcm.LcmRequest; -import org.onap.policy.appclcm.LcmRequestWrapper; -import org.onap.policy.appclcm.LcmResponse; -import org.onap.policy.appclcm.LcmResponseWrapper; +import org.onap.policy.appclcm.AppcLcmBody; +import org.onap.policy.appclcm.AppcLcmDmaapWrapper; +import org.onap.policy.appclcm.AppcLcmInput; +import org.onap.policy.appclcm.AppcLcmOutput; import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure; import org.onap.policy.common.endpoints.event.comm.TopicListener; import org.onap.policy.common.endpoints.event.comm.TopicSink; @@ -155,7 +155,7 @@ public class ControlLoopFailureTest extends ControlLoopBase implements TopicList org.onap.policy.controlloop.VirtualControlLoopNotification.class); } else if ("APPC-LCM-READ".equals(topic)) { obj = org.onap.policy.appclcm.util.Serialization.gsonJunit.fromJson(event, - org.onap.policy.appclcm.LcmRequestWrapper.class); + org.onap.policy.appclcm.AppcLcmDmaapWrapper.class); } assertNotNull(obj); if (obj instanceof VirtualControlLoopNotification) { @@ -222,12 +222,12 @@ public class ControlLoopFailureTest extends ControlLoopBase implements TopicList logger.debug("The control loop timed out"); fail("Control Loop Timed Out"); } - } else if (obj instanceof LcmRequestWrapper) { + } else if (obj instanceof AppcLcmDmaapWrapper) { /* * The request should be of type LCMRequestWrapper and the subrequestid should be 1 */ - LcmRequestWrapper dmaapRequest = (LcmRequestWrapper) obj; - LcmRequest appcRequest = dmaapRequest.getBody(); + AppcLcmDmaapWrapper dmaapRequest = (AppcLcmDmaapWrapper) obj; + AppcLcmInput appcRequest = dmaapRequest.getBody().getInput(); assertTrue(appcRequest.getCommonHeader().getSubRequestId().equals("1")); logger.debug("\n============ APPC received the request!!! ===========\n"); @@ -235,11 +235,12 @@ public class ControlLoopFailureTest extends ControlLoopBase implements TopicList /* * Simulate a success response from APPC and insert the response into the working memory */ - LcmResponseWrapper dmaapResponse = new LcmResponseWrapper(); - LcmResponse appcResponse = new LcmResponse(appcRequest); + AppcLcmDmaapWrapper dmaapResponse = new AppcLcmDmaapWrapper(); + AppcLcmOutput appcResponse = new AppcLcmOutput(appcRequest); appcResponse.getStatus().setCode(400); appcResponse.getStatus().setMessage("AppC success"); - dmaapResponse.setBody(appcResponse); + dmaapResponse.setBody(new AppcLcmBody()); + dmaapResponse.getBody().setOutput(appcResponse); /* * Interrupting with a different request for the same target entity to check if lock |