diff options
author | Ali Hockla <ah999m@att.com> | 2019-11-08 12:54:02 -0600 |
---|---|---|
committer | Ali Hockla <ah999m@att.com> | 2019-11-12 08:06:23 -0600 |
commit | 8d28c6fc936eb4bd95ad1ebd013996cff4787e0e (patch) | |
tree | ce1a83362e61812de0edadc1e03635f071c07286 /xacml-test/src/main/java/org/onap | |
parent | dd69ccf79236b5268cc8cac2638fcd07f373bd4d (diff) |
Added support to return status and error if pdp-x failed to load policy
Issue-ID: POLICY-2175
Change-Id: I32d2fe78846f58d6e700100dd523732817f1f04d
Signed-off-by: Ali Hockla <ah999m@att.com>
Diffstat (limited to 'xacml-test/src/main/java/org/onap')
-rw-r--r-- | xacml-test/src/main/java/org/onap/policy/pdp/xacml/xacmltest/TestUtils.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xacml-test/src/main/java/org/onap/policy/pdp/xacml/xacmltest/TestUtils.java b/xacml-test/src/main/java/org/onap/policy/pdp/xacml/xacmltest/TestUtils.java index 70f9ebc0..cb12e0f6 100644 --- a/xacml-test/src/main/java/org/onap/policy/pdp/xacml/xacmltest/TestUtils.java +++ b/xacml-test/src/main/java/org/onap/policy/pdp/xacml/xacmltest/TestUtils.java @@ -25,7 +25,6 @@ package org.onap.policy.pdp.xacml.xacmltest; import java.util.ArrayList; import java.util.List; import java.util.Map; - import org.onap.policy.common.utils.coder.CoderException; import org.onap.policy.common.utils.coder.StandardYamlCoder; import org.onap.policy.common.utils.resources.ResourceUtils; @@ -82,10 +81,11 @@ public class TestUtils { // for (Map<String, ToscaPolicy> policies : completedJtst.getToscaTopologyTemplate().getPolicies()) { for (ToscaPolicy policy : policies.values()) { - if (service.loadPolicy(policy)) { + try { + service.loadPolicy(policy); loadedPolicies.add(policy); - } else { - LOGGER.error("Application failed to load policy"); + } catch (XacmlApplicationException e) { + LOGGER.error("Application failed to load policy", e); } } } |