From: Duarte Meneses Date: Fri, 29 Dec 2017 13:47:49 +0000 (+0100) Subject: Fix ITs X-Git-Tag: 3.1.0.1141~6 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=01577300518f84fd5a36a9b57c7cbe44df805a96;p=sonar-scanner-cli.git Fix ITs --- diff --git a/it/src/test/java/com/sonarsource/scanner/it/JavaTest.java b/it/src/test/java/com/sonarsource/scanner/it/JavaTest.java index 1f53a88..dd7b296 100644 --- a/it/src/test/java/com/sonarsource/scanner/it/JavaTest.java +++ b/it/src/test/java/com/sonarsource/scanner/it/JavaTest.java @@ -27,6 +27,7 @@ import java.io.IOException; import java.util.List; import java.util.Map; import java.util.stream.Collectors; +import org.fest.assertions.Condition; import org.junit.After; import org.junit.Rule; import org.junit.Test; @@ -290,7 +291,12 @@ public class JavaTest extends ScannerTestCase { BuildResult executeBuild = orchestrator.executeBuildQuietly(build); assertThat(executeBuild.getStatus()).isNotEqualTo(0); String logs = executeBuild.getLogs(); - assertThat(logs).contains("java.lang.OutOfMemoryError"); + assertThat(logs).satisfies(new Condition() { + @Override + public boolean matches(String value) { + return value.contains("java.lang.OutOfMemoryError") || value.contains("GC overhead limit exceeded"); + } + }); } }