aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/java/org/onap/dcae/vestest/TestVESLogger.java
diff options
context:
space:
mode:
authorJakub Zieba <jakub.zieba@nokia.com>2018-09-04 07:23:41 +0200
committerJakub Zieba <jakub.zieba@nokia.com>2018-09-04 12:25:51 +0200
commit4026d98bc9802e41146ff6ef727d349c7ac1e89e (patch)
treec0294dbab65bb12928ccf0d399904ea4cb5c84af /src/test/java/org/onap/dcae/vestest/TestVESLogger.java
parentc84e8030f5f53c2f38b11428a545cd6992a6ba02 (diff)
Add protocols to hosts
Add default protocols for Consul hosts Add controller for healt check Fix for merging properties from file and Consul Change-Id: Ifa8c7cdfa333d8ffee175b5eb4446f0c3a986f27 Issue-ID: DCAEGEN2-747 Signed-off-by: Jakub Zieba <jakub.zieba@nokia.com>
Diffstat (limited to 'src/test/java/org/onap/dcae/vestest/TestVESLogger.java')
-rw-r--r--src/test/java/org/onap/dcae/vestest/TestVESLogger.java75
1 files changed, 37 insertions, 38 deletions
diff --git a/src/test/java/org/onap/dcae/vestest/TestVESLogger.java b/src/test/java/org/onap/dcae/vestest/TestVESLogger.java
index 484f7dc8..848f2b76 100644
--- a/src/test/java/org/onap/dcae/vestest/TestVESLogger.java
+++ b/src/test/java/org/onap/dcae/vestest/TestVESLogger.java
@@ -19,57 +19,56 @@
*/
package org.onap.dcae.vestest;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNotSame;
-import static org.onap.dcae.commonFunction.VESLogger.REQUEST_ID;
-
import com.att.nsa.logging.LoggingContext;
import com.att.nsa.logging.log4j.EcompFields;
-import java.util.UUID;
import org.junit.Test;
import org.onap.dcae.commonFunction.VESLogger;
+import java.util.UUID;
+
+import static org.junit.Assert.*;
+import static org.onap.dcae.commonFunction.VESLogger.REQUEST_ID;
+
public class TestVESLogger {
- @Test
- public void shouldOnLoggingContextInitializationPutRandomUUIDAsRequestID() {
- LoggingContext commonLoggingContext = VESLogger.getCommonLoggingContext();
- String requestId = commonLoggingContext.get(REQUEST_ID, "default");
+ @Test
+ public void shouldOnLoggingContextInitializationPutRandomUuidAsRequestId() {
+ LoggingContext commonLoggingContext = VESLogger.getCommonLoggingContext();
+ String requestId = commonLoggingContext.get(REQUEST_ID, "default");
- assertNotNull(requestId);
- assertNotSame(requestId, "default");
+ assertNotNull(requestId);
+ assertNotSame(requestId, "default");
- }
+ }
- @Test
- public void shouldOnLoggingContextInitializationPutGivenUUIDAsRequestIDAndSupplyEndTimestamp() {
- final UUID uuid = UUID.randomUUID();
- LoggingContext loggingContextForThread = VESLogger.getLoggingContextForThread(uuid);
- String requestId = loggingContextForThread.get(REQUEST_ID, "default");
- String endTimestamp = loggingContextForThread.get(EcompFields.kEndTimestamp, "default");
+ @Test
+ public void shouldOnLoggingContextInitializationPutGivenUuuidAsRequestIdAndSupplyEndTimestamp() {
+ final UUID uuid = UUID.randomUUID();
+ LoggingContext loggingContextForThread = VESLogger.getLoggingContextForThread(uuid);
+ String requestId = loggingContextForThread.get(REQUEST_ID, "default");
+ String endTimestamp = loggingContextForThread.get(EcompFields.kEndTimestamp, "default");
- assertNotNull(requestId);
- assertNotNull(endTimestamp);
- assertNotSame(endTimestamp, "default");
- assertEquals(requestId, uuid.toString());
- }
+ assertNotNull(requestId);
+ assertNotNull(endTimestamp);
+ assertNotSame(endTimestamp, "default");
+ assertEquals(requestId, uuid.toString());
+ }
- @Test
- public void shouldOnLoggingContextInitializationPutGivenUUIDAsRequestIDAndSupplyEndTimestampAndCompleteStatusCode() {
- final UUID uuid = UUID.randomUUID();
- LoggingContext loggingContextForThread = VESLogger.getLoggingContextForThread(uuid.toString());
- String requestId = loggingContextForThread.get(REQUEST_ID, "default");
- String statusCode = loggingContextForThread.get("statusCode", "default");
- String endTimestamp = loggingContextForThread.get(EcompFields.kEndTimestamp, "default");
+ @Test
+ public void shouldOnLoggingContextInitializationPutGivenUuidAsRequestIdAndSupplyEndTimestampAndCompleteStatusCode() {
+ final UUID uuid = UUID.randomUUID();
+ LoggingContext loggingContextForThread = VESLogger.getLoggingContextForThread(uuid.toString());
+ String requestId = loggingContextForThread.get(REQUEST_ID, "default");
+ String statusCode = loggingContextForThread.get("statusCode", "default");
+ String endTimestamp = loggingContextForThread.get(EcompFields.kEndTimestamp, "default");
- assertNotNull(requestId);
- assertNotNull(endTimestamp);
- assertNotNull(statusCode);
- assertNotSame(endTimestamp, "default");
- assertEquals(requestId, uuid.toString());
- assertEquals(statusCode, "COMPLETE");
- }
+ assertNotNull(requestId);
+ assertNotNull(endTimestamp);
+ assertNotNull(statusCode);
+ assertNotSame(endTimestamp, "default");
+ assertEquals(requestId, uuid.toString());
+ assertEquals(statusCode, "COMPLETE");
+ }
}