]> source.dussan.org Git - sonarqube.git/commitdiff
Update scanner perf tests to scanner 2.8
authorDuarte Meneses <duarte.meneses@sonarsource.com>
Wed, 3 May 2017 15:30:20 +0000 (17:30 +0200)
committerdbmeneses <duarte.meneses@sonarsource.com>
Thu, 4 May 2017 08:11:43 +0000 (09:11 +0100)
tests/perf/src/test/java/org/sonarsource/sonarqube/perf/PerfTestCase.java
tests/perf/src/test/java/org/sonarsource/sonarqube/perf/scanner/suite/IssuesModeTest.java
tests/perf/src/test/java/org/sonarsource/sonarqube/perf/scanner/suite/MemoryTest.java

index e7882bdd0f0ee46dd74a90736106b7e061246db2..9a6ffa44fa0a1f4d2233fd2ecaa16ae61eaf1f49 100644 (file)
@@ -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;
   }
index 76b6b219d6eda717b79eb89736628914060fd6b8..38ebfcb16e796c3ef62715883d38483eb4d3b054 100644 (file)
@@ -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;
index 01f9532d910285365173ffbaf9e8ae0583c80759..d05852c9078a0862a9eea6629a3bf6176321dd3a 100644 (file)
@@ -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 {