From 0269db0e8510664a652015bb6fe38c5b9b73ce82 Mon Sep 17 00:00:00 2001 From: Marko Strukelj Date: Thu, 6 Apr 2017 12:46:05 +0200 Subject: [PATCH] KEYCLOAK-4719 CLI tests fail when run from within the IDE --- .../java/org/keycloak/testsuite/cli/exec/AbstractExec.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/cli/exec/AbstractExec.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/cli/exec/AbstractExec.java index 91fcb1318d..b5476b5aa4 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/cli/exec/AbstractExec.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/cli/exec/AbstractExec.java @@ -14,6 +14,7 @@ import java.io.OutputStream; import java.util.ArrayList; import java.util.List; import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; /** * @author Marko Strukelj @@ -181,7 +182,11 @@ public abstract class AbstractExec { } public List stderrLines() { - return parseStreamAsLines(new ByteArrayInputStream(stderr.toByteArray())); + return filterAgentsOutput(parseStreamAsLines(new ByteArrayInputStream(stderr.toByteArray()))); + } + + public static List filterAgentsOutput(List lines) { + return lines.stream().filter(line -> !line.contains("JAVA_TOOL_OPTIONS")).collect(Collectors.toList()); } public String stderrString() {