diff options
2 files changed, 5 insertions, 4 deletions
diff --git a/models-interactions/model-actors/actor.appc/src/main/java/org/onap/policy/controlloop/actor/appc/AppcOperation.java b/models-interactions/model-actors/actor.appc/src/main/java/org/onap/policy/controlloop/actor/appc/AppcOperation.java index 5e84871cc..3ed23957a 100644 --- a/models-interactions/model-actors/actor.appc/src/main/java/org/onap/policy/controlloop/actor/appc/AppcOperation.java +++ b/models-interactions/model-actors/actor.appc/src/main/java/org/onap/policy/controlloop/actor/appc/AppcOperation.java @@ -145,7 +145,9 @@ public abstract class AppcOperation extends BidirectionalTopicOperation<Request, @Override protected Status detmStatus(String rawResponse, Response response) { if (response.getStatus() == null) { - throw new IllegalArgumentException("APP-C response is missing the response status"); + // no status - this must be a request, not a response - just ignore it + logger.info("{}: ignoring request message for {}", getFullName(), params.getRequestId()); + return Status.STILL_WAITING; } ResponseCode code = ResponseCode.toResponseCode(response.getStatus().getCode()); diff --git a/models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/AppcOperationTest.java b/models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/AppcOperationTest.java index 204d95aa1..30450d02a 100644 --- a/models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/AppcOperationTest.java +++ b/models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/AppcOperationTest.java @@ -177,10 +177,9 @@ public class AppcOperationTest extends BasicAppcOperation { public void testDetmStatusStringResponse() { final ResponseStatus status = response.getStatus(); - // null status + // null status (i.e., it's a Request, not a Response) response.setStatus(null); - assertThatIllegalArgumentException().isThrownBy(() -> oper.detmStatus("", response)) - .withMessage("APP-C response is missing the response status"); + assertEquals(Status.STILL_WAITING, oper.detmStatus("", response)); response.setStatus(status); // invalid code |