]> source.dussan.org Git - sonar-scanner-cli.git/commitdiff
Fix ITs
authorDuarte Meneses <duarte.meneses@sonarsource.com>
Fri, 29 Dec 2017 13:47:49 +0000 (14:47 +0100)
committerDuarte Meneses <duarte.meneses@sonarsource.com>
Fri, 29 Dec 2017 14:12:23 +0000 (15:12 +0100)
it/src/test/java/com/sonarsource/scanner/it/JavaTest.java

index 1f53a883639e268494a43665a3fb4a843d64df45..dd7b296b2481cc85640259e3737ed8c0525ffa98 100644 (file)
@@ -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<String>() {
+      @Override
+      public boolean matches(String value) {
+        return value.contains("java.lang.OutOfMemoryError") || value.contains("GC overhead limit exceeded");
+      }
+    });
   }
 
 }