diff options
Diffstat (limited to 'models-interactions/model-actors/actor.so/src/test')
-rw-r--r-- | models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/SoOperationTest.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/SoOperationTest.java b/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/SoOperationTest.java index 80f20b59b..ce0d2c24f 100644 --- a/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/SoOperationTest.java +++ b/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/SoOperationTest.java @@ -166,21 +166,23 @@ public class SoOperationTest extends BasicSoOperation { @Test public void testPostProcess() throws Exception { // completed - outcome.setSubRequestId(null); + oper.generateSubRequestId(2); + assertNull(oper.getSubRequestId()); CompletableFuture<OperationOutcome> future2 = oper.postProcessResponse(outcome, PATH, rawResponse, response); assertTrue(future2.isDone()); assertSame(outcome, future2.get()); assertEquals(PolicyResult.SUCCESS, outcome.getResult()); - assertNotNull(outcome.getSubRequestId()); + assertNotNull(oper.getSubRequestId()); // failed - outcome.setSubRequestId(null); + oper.generateSubRequestId(2); + assertNull(oper.getSubRequestId()); response.getRequest().getRequestStatus().setRequestState(SoOperation.FAILED); future2 = oper.postProcessResponse(outcome, PATH, rawResponse, response); assertTrue(future2.isDone()); assertSame(outcome, future2.get()); assertEquals(PolicyResult.FAILURE, outcome.getResult()); - assertNotNull(outcome.getSubRequestId()); + assertNotNull(oper.getSubRequestId()); // no request id in the response response.getRequestReferences().setRequestId(null); |