From 8d28c6fc936eb4bd95ad1ebd013996cff4787e0e Mon Sep 17 00:00:00 2001 From: Ali Hockla Date: Fri, 8 Nov 2019 12:54:02 -0600 Subject: 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 --- .../main/java/org/onap/policy/pdp/xacml/xacmltest/TestUtils.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'xacml-test/src/main/java') 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 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); } } } -- cgit 1.2.3-korg