aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/src/test/java/org
diff options
context:
space:
mode:
authorAjith Sreekumar <ajith.sreekumar@bell.ca>2021-08-09 12:50:31 +0000
committerGerrit Code Review <gerrit@onap.org>2021-08-09 12:50:31 +0000
commit8a2f14ae90528454c4aa2351f8f4c1e04eaed2b6 (patch)
treeed0435840f311deb55b5744a64fcb1b4fde78a9d /runtime/src/test/java/org
parent522f98830955eeef3a2e602b855d2af01bafe941 (diff)
parent4aa0eb0bae6353408e9a82d8f07af1703ccaf9d3 (diff)
Merge "Use slf4j instead of EELFLogger in Clamp"
Diffstat (limited to 'runtime/src/test/java/org')
-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;