diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2019-06-25 16:33:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-25 16:33:56 +0200 |
commit | 23615069db2863f45dba4b9df50b30cf6fb7b792 (patch) | |
tree | 38470e3866b2cc78797c7d98bf15502d22809a8f /it | |
parent | ec4642444b5902a4aeb5c8b509e1f4060d54cfe4 (diff) | |
download | sonar-scanner-cli-23615069db2863f45dba4b9df50b30cf6fb7b792.tar.gz sonar-scanner-cli-23615069db2863f45dba4b9df50b30cf6fb7b792.zip |
SQSCANNER-60 Upgrade embedded JRE to 114.0.0.1744
Move QA to use Jenkinsfile
Diffstat (limited to 'it')
-rw-r--r-- | it/src/test/java/com/sonarsource/scanner/it/ScannerTest.java | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/it/src/test/java/com/sonarsource/scanner/it/ScannerTest.java b/it/src/test/java/com/sonarsource/scanner/it/ScannerTest.java index fa147ac..f003df2 100644 --- a/it/src/test/java/com/sonarsource/scanner/it/ScannerTest.java +++ b/it/src/test/java/com/sonarsource/scanner/it/ScannerTest.java @@ -25,7 +25,6 @@ import java.io.File; import java.io.IOException; import java.util.Map; import java.util.stream.Collectors; -import org.assertj.core.api.Condition; import org.junit.After; import org.junit.Rule; import org.junit.Test; @@ -188,19 +187,15 @@ public class ScannerTest extends ScannerTestCase { } @Test - public void verify_env_variable() { + public void verify_scanner_opts_env_variable_passed_as_jvm_argument() { SonarScanner build = newScanner(new File("projects/simple-sample")) - .setEnvironmentVariable("SONAR_SCANNER_OPTS", "-Xmx2m"); + .setEnvironmentVariable("SONAR_SCANNER_OPTS", "-Xmx1k"); BuildResult executeBuild = orchestrator.executeBuildQuietly(build); - assertThat(executeBuild.getStatus()).isNotEqualTo(0); + assertThat(executeBuild.getLastStatus()).isNotEqualTo(0); String logs = executeBuild.getLogs(); - assertThat(logs).is(new Condition<String>("Contain error message about OOM") { - @Override - public boolean matches(String value) { - return value.contains("java.lang.OutOfMemoryError") - || value.contains("GC overhead limit exceeded") || value.contains("Java heap space"); - } - }); + assertThat(logs).contains("Error occurred during initialization of VM"); + // Not the same message with JRE 8 and 11 + assertThat(logs).containsPattern("Too small (initial|maximum) heap"); } } |