summaryrefslogtreecommitdiffstats
path: root/policy-utils/src/test/java/org
diff options
context:
space:
mode:
authorTaka Cho <takamune.cho@att.com>2021-08-03 13:28:28 -0400
committerTaka Cho <takamune.cho@att.com>2021-08-06 13:13:13 -0400
commitaabb9e500132bbcd639bc4b8bda34e8fde3a3676 (patch)
tree15d2d58f918ca30f0160c550fd1d2814d04d5816 /policy-utils/src/test/java/org
parent1744dac574fb771301027be74c9257eb070125f7 (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/java/org')
-rw-r--r--policy-utils/src/test/java/org/onap/policy/drools/utils/PropertyUtilTest.java6
-rw-r--r--policy-utils/src/test/java/org/onap/policy/drools/utils/logging/LoggerUtilTest.java19
2 files changed, 13 insertions, 12 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());
}