aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcmso-sonar/docker/integration/ete_test.sh1
-rw-r--r--cmso-sonar/src/test/java/org/onap/optf/cmso/it/ItFullIntegrationTest.java18
2 files changed, 14 insertions, 5 deletions
diff --git a/cmso-sonar/docker/integration/ete_test.sh b/cmso-sonar/docker/integration/ete_test.sh
index aff605e..09ad69e 100755
--- a/cmso-sonar/docker/integration/ete_test.sh
+++ b/cmso-sonar/docker/integration/ete_test.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+set -x
docker-compose up >up.txt 2>&1 &
### Wait for robot to finish
diff --git a/cmso-sonar/src/test/java/org/onap/optf/cmso/it/ItFullIntegrationTest.java b/cmso-sonar/src/test/java/org/onap/optf/cmso/it/ItFullIntegrationTest.java
index aa3779a..9beafd9 100644
--- a/cmso-sonar/src/test/java/org/onap/optf/cmso/it/ItFullIntegrationTest.java
+++ b/cmso-sonar/src/test/java/org/onap/optf/cmso/it/ItFullIntegrationTest.java
@@ -18,6 +18,8 @@ import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
@@ -39,12 +41,18 @@ public class ItFullIntegrationTest {
Process process = null;
try {
ProcessBuilder processBuilder = buildCommand();
+ processBuilder = processBuilder.redirectErrorStream(true);
process = processBuilder.start();
- // debug.debug("engine command=" + commandString);
- String stdout = IOUtils.toString(process.getInputStream(), "UTF-8");
- String stderr = IOUtils.toString(process.getErrorStream(), "UTF-8");
- System.out.println("stdout=" + stdout);
- System.out.println("stderr=" + stderr);
+ try (var reader = new BufferedReader(
+ new InputStreamReader(process.getInputStream()))) {
+
+ String line;
+
+ while ((line = reader.readLine()) != null) {
+ System.out.println(line);
+ }
+
+ }
copyJacocoFiles();
copyClassFiles();
copyForSonar();