aboutsummaryrefslogtreecommitdiffstats
path: root/common-logging/src/test/java/org/onap/policy
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2020-04-10 16:49:36 +0000
committerGerrit Code Review <gerrit@onap.org>2020-04-10 16:49:36 +0000
commitbd2f8d37084f480811b4495b54478260a10e4f1b (patch)
tree51774104ee328ea2d504974f2a4eb2694f954f75 /common-logging/src/test/java/org/onap/policy
parent5e4b19bce793b4fcb30ed45c49a74d7f6c8ed19f (diff)
parent8ed1d1c28fbf0e95e86f061f50bb362265ca51de (diff)
Merge "Update common-logging for log enhancement work"
Diffstat (limited to 'common-logging/src/test/java/org/onap/policy')
-rw-r--r--common-logging/src/test/java/org/onap/policy/common/logging/eelf/ErrorCodeMapTest.java7
-rw-r--r--common-logging/src/test/java/org/onap/policy/common/logging/eelf/PolicyLoggerTest.java6
2 files changed, 7 insertions, 6 deletions
diff --git a/common-logging/src/test/java/org/onap/policy/common/logging/eelf/ErrorCodeMapTest.java b/common-logging/src/test/java/org/onap/policy/common/logging/eelf/ErrorCodeMapTest.java
index 781be600..c34d9696 100644
--- a/common-logging/src/test/java/org/onap/policy/common/logging/eelf/ErrorCodeMapTest.java
+++ b/common-logging/src/test/java/org/onap/policy/common/logging/eelf/ErrorCodeMapTest.java
@@ -3,13 +3,14 @@
* ONAP-Logging
* ================================================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2020 AT&T.
* ================================================================================
* 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.
@@ -47,7 +48,7 @@ public class ErrorCodeMapTest {
@Test
public void testErrorCodeInfoGetErrorCode() {
ErrorCodeInfo errorCodeInfo = ErrorCodeMap.getErrorCodeInfo(MessageCodes.EXCEPTION_ERROR);
- assertEquals("POLICY-503E", errorCodeInfo.getErrorCode());
+ assertEquals("500", errorCodeInfo.getErrorCode());
}
@Test
diff --git a/common-logging/src/test/java/org/onap/policy/common/logging/eelf/PolicyLoggerTest.java b/common-logging/src/test/java/org/onap/policy/common/logging/eelf/PolicyLoggerTest.java
index 95dbe336..b318c18d 100644
--- a/common-logging/src/test/java/org/onap/policy/common/logging/eelf/PolicyLoggerTest.java
+++ b/common-logging/src/test/java/org/onap/policy/common/logging/eelf/PolicyLoggerTest.java
@@ -287,7 +287,7 @@ public class PolicyLoggerTest {
Whitebox.setInternalState(PolicyLogger.class, "errorLogger", mockLogger);
PolicyLogger.error("str1", "str2");
Mockito.verify(mockLogger).error(MessageCodes.GENERAL_ERROR, "str2");
- assertEquals("POLICY-515E", MDC.get("ErrorCode"));
+ assertEquals("500", MDC.get("ErrorCode"));
assertEquals("This is a general error message during the process. Please check the error message for detail "
+ "information", MDC.get("ErrorDescription"));
}
@@ -299,7 +299,7 @@ public class PolicyLoggerTest {
PolicyLogger.error("str1");
Mockito.verify(mockLogger).error(MessageCodes.GENERAL_ERROR, "str1");
assertEquals("ERROR", MDC.get("ErrorCategory"));
- assertEquals("POLICY-515E", MDC.get("ErrorCode"));
+ assertEquals("500", MDC.get("ErrorCode"));
assertEquals("This is a general error message during the process. Please check the error message for detail "
+ "information", MDC.get("ErrorDescription"));
}
@@ -311,7 +311,7 @@ public class PolicyLoggerTest {
PolicyLogger.error(1);
Mockito.verify(mockLogger).error(MessageCodes.GENERAL_ERROR, "1");
assertEquals("ERROR", MDC.get("ErrorCategory"));
- assertEquals("POLICY-515E", MDC.get("ErrorCode"));
+ assertEquals("500", MDC.get("ErrorCode"));
assertEquals("This is a general error message during the process. Please check the error message for detail "
+ "information", MDC.get("ErrorDescription"));
}