diff options
author | jhh <jorge.hernandez-herrero@att.com> | 2020-08-24 13:09:58 -0500 |
---|---|---|
committer | jhh <jorge.hernandez-herrero@att.com> | 2020-08-24 13:31:56 -0500 |
commit | 13d8a3204013f1c0bc02ddede96ab37ac3d64129 (patch) | |
tree | 23e177ae2def54565057fa4470080899ddd083fb /policy-management/src/test | |
parent | 3254c7d85a6540bc3590dbe5559fd4dd55acd825 (diff) |
exit jvm when detecting configuration problems
It follows the same approach that in other policy
components by throwing a runtime-exception vs
System.exit(x).
Issue-ID: POLICY-2752
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Iba508fc7095b060373742849e394c8fdd2a2334f
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Diffstat (limited to 'policy-management/src/test')
-rw-r--r-- | policy-management/src/test/java/org/onap/policy/drools/system/PolicyDroolsPdpRuntimeExceptionTest.java | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/policy-management/src/test/java/org/onap/policy/drools/system/PolicyDroolsPdpRuntimeExceptionTest.java b/policy-management/src/test/java/org/onap/policy/drools/system/PolicyDroolsPdpRuntimeExceptionTest.java new file mode 100644 index 00000000..64595178 --- /dev/null +++ b/policy-management/src/test/java/org/onap/policy/drools/system/PolicyDroolsPdpRuntimeExceptionTest.java @@ -0,0 +1,37 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP + * ================================================================================ + * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.drools.system; + +import static org.junit.Assert.assertEquals; + +import org.junit.Test; +import org.onap.policy.common.utils.test.ExceptionsTester; + +public class PolicyDroolsPdpRuntimeExceptionTest { + + @Test + public void test() { + assertEquals(2, new ExceptionsTester().test(PolicyDroolsPdpRuntimeException.class)); + } + +} |