diff options
author | Taka Cho <takamune.cho@att.com> | 2021-08-03 13:28:28 -0400 |
---|---|---|
committer | Taka Cho <takamune.cho@att.com> | 2021-08-06 13:13:13 -0400 |
commit | aabb9e500132bbcd639bc4b8bda34e8fde3a3676 (patch) | |
tree | 15d2d58f918ca30f0160c550fd1d2814d04d5816 /policy-utils/src/test | |
parent | 1744dac574fb771301027be74c9257eb070125f7 (diff) |
Use slf4j Marker from common repo
using slf4j Marker from common repo
Issue-ID: POLICY-3087
Change-Id: Iefbd6fa9ab2dfa6388508cb6ffd6cf1358b45ccc
Signed-off-by: Taka Cho <takamune.cho@att.com>
Diffstat (limited to 'policy-utils/src/test')
3 files changed, 15 insertions, 14 deletions
diff --git a/policy-utils/src/test/java/org/onap/policy/drools/utils/PropertyUtilTest.java b/policy-utils/src/test/java/org/onap/policy/drools/utils/PropertyUtilTest.java index 4b4b9d64..c19adea4 100644 --- a/policy-utils/src/test/java/org/onap/policy/drools/utils/PropertyUtilTest.java +++ b/policy-utils/src/test/java/org/onap/policy/drools/utils/PropertyUtilTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP * ================================================================================ - * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2021 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. @@ -34,8 +34,8 @@ import org.apache.commons.lang3.StringUtils; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; +import org.onap.policy.common.utils.logging.LoggerUtils; import org.onap.policy.common.utils.security.CryptoUtils; -import org.onap.policy.drools.utils.logging.LoggerUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -244,7 +244,7 @@ public class PropertyUtilTest { assertEquals(System.getenv("HOME"), props.getProperty(INTERPOLATION_ENVD)); assertEquals(StringUtils.EMPTY, props.getProperty(INTERPOLATION_ENVD_NONE)); assertEquals(StringUtils.EMPTY, props.getProperty(INTERPOLATION_ENVD_NO_DEFAULT)); - assertEquals(LoggerUtil.ROOT_LOGGER, props.getProperty(INTERPOLATION_CONST)); + assertEquals(LoggerUtils.ROOT_LOGGER, props.getProperty(INTERPOLATION_CONST)); assertEquals(System.getProperty("user.home"), props.getProperty(INTERPOLATION_SYS)); assertEquals(INTERPOLATION_ENVD_DEFAULT_VALUE, props.getProperty(INTERPOLATION_ENVD_DEFAULT)); } diff --git a/policy-utils/src/test/java/org/onap/policy/drools/utils/logging/LoggerUtilTest.java b/policy-utils/src/test/java/org/onap/policy/drools/utils/logging/LoggerUtilTest.java index be1a8a97..195a7add 100644 --- a/policy-utils/src/test/java/org/onap/policy/drools/utils/logging/LoggerUtilTest.java +++ b/policy-utils/src/test/java/org/onap/policy/drools/utils/logging/LoggerUtilTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * policy-utils * ================================================================================ - * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2018, 2021 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. @@ -24,6 +24,7 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import org.junit.Test; +import org.onap.policy.common.utils.logging.LoggerUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -37,20 +38,20 @@ public class LoggerUtilTest { assertTrue(logger.isInfoEnabled()); logger.info("line 1"); - logger.info(LoggerUtil.METRIC_LOG_MARKER, "line 1 Metric"); - logger.info(LoggerUtil.TRANSACTION_LOG_MARKER, "line 1 Transaction"); + logger.info(LoggerUtils.METRIC_LOG_MARKER, "line 1 Metric"); + logger.info(LoggerUtils.TRANSACTION_LOG_MARKER, "line 1 Transaction"); - LoggerUtil.setLevel(LoggerUtil.ROOT_LOGGER, "warn"); + LoggerUtils.setLevel(LoggerUtils.ROOT_LOGGER, "warn"); logger.info("line 2"); - logger.info(LoggerUtil.METRIC_LOG_MARKER, "line 2 Metric"); - logger.info(LoggerUtil.TRANSACTION_LOG_MARKER, "line 2 Transaction"); + logger.info(LoggerUtils.METRIC_LOG_MARKER, "line 2 Metric"); + logger.info(LoggerUtils.TRANSACTION_LOG_MARKER, "line 2 Transaction"); assertFalse(logger.isInfoEnabled()); - LoggerUtil.setLevel(LoggerUtil.ROOT_LOGGER, "debug"); + LoggerUtils.setLevel(LoggerUtils.ROOT_LOGGER, "debug"); logger.debug("line 3"); - logger.debug(LoggerUtil.METRIC_LOG_MARKER, "line 3 Metric"); - logger.debug(LoggerUtil.TRANSACTION_LOG_MARKER, "line 3 Transaction"); + logger.debug(LoggerUtils.METRIC_LOG_MARKER, "line 3 Metric"); + logger.debug(LoggerUtils.TRANSACTION_LOG_MARKER, "line 3 Transaction"); assertTrue(logger.isDebugEnabled()); } diff --git a/policy-utils/src/test/resources/interpolation.properties b/policy-utils/src/test/resources/interpolation.properties index 78ec546b..aeb88a9b 100644 --- a/policy-utils/src/test/resources/interpolation.properties +++ b/policy-utils/src/test/resources/interpolation.properties @@ -2,7 +2,7 @@ # ============LICENSE_START======================================================= # ONAP # ================================================================================ -# Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved. +# Copyright (C) 2019-2021 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. @@ -20,7 +20,7 @@ interpolation.no=no interpolation.env=${env:HOME} -interpolation.const=${const:org.onap.policy.drools.utils.logging.LoggerUtil.ROOT_LOGGER} +interpolation.const=${const:org.onap.policy.common.utils.logging.LoggerUtils.ROOT_LOGGER} interpolation.sys=${sys:user.home} interpolation.envd=${envd:HOME} interpolation.envd.default=${envd:BLAH:default} |