summaryrefslogtreecommitdiffstats
path: root/runtime/src/test/java
diff options
context:
space:
mode:
authorTaka Cho <takamune.cho@att.com>2021-07-27 16:36:13 -0400
committerTaka Cho <takamune.cho@att.com>2021-08-05 13:58:43 -0400
commit4aa0eb0bae6353408e9a82d8f07af1703ccaf9d3 (patch)
tree4aa872889cc53d276e49a2130b2eb688d06c27a1 /runtime/src/test/java
parent931424fc681b1d41afbba98a190253283f9a6eba (diff)
Use slf4j instead of EELFLogger in Clamp
replace EELF with slf4j logback using slf4j Marker from common repo Issue-ID: POLICY-3087 Change-Id: I56b43584b1603d9eba642c1cd6ef6190526d078b Signed-off-by: Taka Cho <takamune.cho@att.com>
Diffstat (limited to 'runtime/src/test/java')
-rw-r--r--runtime/src/test/java/org/onap/policy/clamp/clds/it/RobotItCase.java10
-rw-r--r--runtime/src/test/java/org/onap/policy/clamp/clds/util/LoggingUtilsTest.java1
2 files changed, 6 insertions, 5 deletions
diff --git a/runtime/src/test/java/org/onap/policy/clamp/clds/it/RobotItCase.java b/runtime/src/test/java/org/onap/policy/clamp/clds/it/RobotItCase.java
index ad7efed36..66c7f3589 100644
--- a/runtime/src/test/java/org/onap/policy/clamp/clds/it/RobotItCase.java
+++ b/runtime/src/test/java/org/onap/policy/clamp/clds/it/RobotItCase.java
@@ -25,8 +25,6 @@ package org.onap.policy.clamp.clds.it;
import static org.apache.commons.io.FileUtils.copyInputStreamToFile;
-import com.att.eelf.configuration.EELFLogger;
-import com.att.eelf.configuration.EELFManager;
import com.github.dockerjava.api.DockerClient;
import com.github.dockerjava.api.command.BuildImageResultCallback;
import com.github.dockerjava.api.command.CreateContainerResponse;
@@ -46,6 +44,8 @@ import org.codehaus.plexus.util.FileUtils;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.annotation.DirtiesContext;
@@ -61,7 +61,7 @@ public class RobotItCase {
@Value("${server.port}")
private String httpPort;
private static final int TIMEOUT_S = 150;
- protected static final EELFLogger logger = EELFManager.getInstance().getLogger(RobotItCase.class);
+ protected static final Logger logger = LoggerFactory.getLogger(RobotItCase.class);
@Test
public void robotTests() throws Exception {
@@ -105,7 +105,7 @@ public class RobotItCase {
exec = client.inspectContainerCmd(id).exec();
tries++;
} while (exec.getState().getRunning() && tries < TIMEOUT_S);
- logger.info("RobotFramework result:" + exec.getState());
+ logger.info("RobotFramework result: {}", exec.getState());
LogContainerCmd logContainerCmd = client.logContainerCmd(id);
logContainerCmd.withStdOut(true).withStdErr(true);
@@ -128,7 +128,7 @@ public class RobotItCase {
new File("target/robotframework/report.html"));
client.stopContainerCmd(id);
- logger.info("RobotFramework output.xml file: " + FileUtils.fileRead("target/robotframework/output.xml"));
+ logger.info("RobotFramework output.xml file: {}", FileUtils.fileRead("target/robotframework/output.xml"));
Assert.assertEquals(exec.getState().getError(), 0L,
Objects.requireNonNull(exec.getState().getExitCodeLong()).longValue());
diff --git a/runtime/src/test/java/org/onap/policy/clamp/clds/util/LoggingUtilsTest.java b/runtime/src/test/java/org/onap/policy/clamp/clds/util/LoggingUtilsTest.java
index 4b93ed7be..f3ca978e7 100644
--- a/runtime/src/test/java/org/onap/policy/clamp/clds/util/LoggingUtilsTest.java
+++ b/runtime/src/test/java/org/onap/policy/clamp/clds/util/LoggingUtilsTest.java
@@ -22,6 +22,7 @@
package org.onap.policy.clamp.clds.util;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;