Merge pull request #4011 from mstruk/KEYCLOAK-4719

KEYCLOAK-4719 CLI tests fail when run from within the IDE
This commit is contained in:
Stian Thorgersen 2017-04-07 09:17:19 +02:00 committed by GitHub
commit 83d0f313ce

View file

@ -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 <a href="mailto:mstrukel@redhat.com">Marko Strukelj</a>
@ -181,7 +182,11 @@ public abstract class AbstractExec {
}
public List<String> stderrLines() {
return parseStreamAsLines(new ByteArrayInputStream(stderr.toByteArray()));
return filterAgentsOutput(parseStreamAsLines(new ByteArrayInputStream(stderr.toByteArray())));
}
public static List<String> filterAgentsOutput(List<String> lines) {
return lines.stream().filter(line -> !line.contains("JAVA_TOOL_OPTIONS")).collect(Collectors.toList());
}
public String stderrString() {