diff options
author | 2017-10-16 12:05:08 -0500 | |
---|---|---|
committer | 2017-10-18 11:03:38 -0500 | |
commit | 506267bf7e9d961f1a6b2a989ee8a23ca67b9d61 (patch) | |
tree | 7f9079c2a19bb5d01bf4f8a7ab84b7168d9a1cb9 /controlloop/common/actors/actor.appc/src/test | |
parent | b2d602aaedfcc9356e07dd94b6baec70c38815b8 (diff) |
Add support for AAI Named Query error handling
Errors from AAI after a Named query now throw an AAIEXception. This is
caught in the template to allow the resources to be removed from memory
and a final failure to be thrown.
Issue-ID: POLICY-314
Change-Id: I319d29ef537b2d01ca288622aac1d9dbbe05f5eb
Signed-off-by: Charles Cole <cc847m@att.com>
Diffstat (limited to 'controlloop/common/actors/actor.appc/src/test')
-rw-r--r-- | controlloop/common/actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/AppcServiceProviderTest.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/controlloop/common/actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/AppcServiceProviderTest.java b/controlloop/common/actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/AppcServiceProviderTest.java index 9d7e46320..7ab368f6f 100644 --- a/controlloop/common/actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/AppcServiceProviderTest.java +++ b/controlloop/common/actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/AppcServiceProviderTest.java @@ -29,6 +29,7 @@ import java.util.UUID; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; +import org.onap.policy.aai.util.AAIException; import org.onap.policy.appc.Request; import org.onap.policy.appc.Response; import org.onap.policy.appc.ResponseCode; @@ -115,7 +116,13 @@ public class AppcServiceProviderTest { @Test public void constructModifyConfigRequestTest() { - Request appcRequest = APPCActorServiceProvider.constructRequest(onsetEvent, operation, policy); + Request appcRequest = null; + try { + appcRequest = APPCActorServiceProvider.constructRequest(onsetEvent, operation, policy); + } catch (AAIException e) { + logger.warn(e.toString()); + fail("no vnfid found"); + } /* The service provider must return a non null APPC request */ assertNotNull(appcRequest); |