diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2017-05-03 17:30:20 +0200 |
---|---|---|
committer | dbmeneses <duarte.meneses@sonarsource.com> | 2017-05-04 09:11:43 +0100 |
commit | d819ec5e04435c0b8b24f59c42bffeae57ceb93f (patch) | |
tree | 2a6a1c29b6f255532104b64e35be1997549d4963 /tests | |
parent | a84369df1a1f3d32fd31356ef1d6474648586462 (diff) | |
download | sonarqube-d819ec5e04435c0b8b24f59c42bffeae57ceb93f.tar.gz sonarqube-d819ec5e04435c0b8b24f59c42bffeae57ceb93f.zip |
Update scanner perf tests to scanner 2.8
Diffstat (limited to 'tests')
3 files changed, 6 insertions, 5 deletions
diff --git a/tests/perf/src/test/java/org/sonarsource/sonarqube/perf/PerfTestCase.java b/tests/perf/src/test/java/org/sonarsource/sonarqube/perf/PerfTestCase.java index e7882bdd0f0..9a6ffa44fa0 100644 --- a/tests/perf/src/test/java/org/sonarsource/sonarqube/perf/PerfTestCase.java +++ b/tests/perf/src/test/java/org/sonarsource/sonarqube/perf/PerfTestCase.java @@ -97,6 +97,7 @@ public abstract class PerfTestCase { .setProperties(props); scanner .setEnvironmentVariable("SONAR_RUNNER_OPTS", sonarRunnerOpts) + .setEnvironmentVariable("SONAR_SCANNER_OPTS", sonarRunnerOpts) .setProjectDir(FileLocation.of("projects/xoo-sample").getFile()); return scanner; } diff --git a/tests/perf/src/test/java/org/sonarsource/sonarqube/perf/scanner/suite/IssuesModeTest.java b/tests/perf/src/test/java/org/sonarsource/sonarqube/perf/scanner/suite/IssuesModeTest.java index 76b6b219d6e..38ebfcb16e7 100644 --- a/tests/perf/src/test/java/org/sonarsource/sonarqube/perf/scanner/suite/IssuesModeTest.java +++ b/tests/perf/src/test/java/org/sonarsource/sonarqube/perf/scanner/suite/IssuesModeTest.java @@ -62,7 +62,7 @@ public class IssuesModeTest extends PerfTestCase { "sonar.analysis.mode", "issues", "sonar.userHome", userHome.getAbsolutePath(), "sonar.showProfiling", "true") - .setScannerVersion("2.4"); + .setScannerVersion("2.8"); long start = System.currentTimeMillis(); orchestrator.executeBuild(runner, false); long duration = System.currentTimeMillis() - start; diff --git a/tests/perf/src/test/java/org/sonarsource/sonarqube/perf/scanner/suite/MemoryTest.java b/tests/perf/src/test/java/org/sonarsource/sonarqube/perf/scanner/suite/MemoryTest.java index 01f9532d910..d05852c9078 100644 --- a/tests/perf/src/test/java/org/sonarsource/sonarqube/perf/scanner/suite/MemoryTest.java +++ b/tests/perf/src/test/java/org/sonarsource/sonarqube/perf/scanner/suite/MemoryTest.java @@ -79,18 +79,18 @@ public class MemoryTest extends PerfTestCase { FileUtils.write(new File(baseDir, "sonar-project.properties"), "sonar.myBigProp=" + Strings.repeat("A", 10000), true); SonarScanner scanner = SonarScanner.create() - .setScannerVersion("2.4") + .setScannerVersion("2.8") .setProperties( "sonar.projectKey", "big-module-tree", "sonar.projectName", "Big Module Tree", "sonar.projectVersion", "1.0", "sonar.sources", "", "sonar.showProfiling", "true"); - scanner.setEnvironmentVariable("SONAR_RUNNER_OPTS", "-Xmx512m -server") + scanner.setEnvironmentVariable("SONAR_SCANNER_OPTS", "-Xmx512m -server") .setProjectDir(baseDir); BuildResult result = orchestrator.executeBuild(scanner); - perfRule.assertDurationAround(MavenLogs.extractTotalTime(result.getLogs()), 4847L); + perfRule.assertDurationAround(MavenLogs.extractTotalTime(result.getLogs()), 6190L); // Second execution with a property on server side orchestrator.getServer().newHttpCall("/api/settings/set") @@ -101,7 +101,7 @@ public class MemoryTest extends PerfTestCase { .setParam("component", "big-module-tree") .execute(); result = orchestrator.executeBuild(scanner); - perfRule.assertDurationAround(MavenLogs.extractTotalTime(result.getLogs()), 4620L); + perfRule.assertDurationAround(MavenLogs.extractTotalTime(result.getLogs()), 6120L); } private void prepareModule(File parentDir, String moduleName, int depth) throws IOException { |