]> source.dussan.org Git - sonarqube.git/commitdiff
Fix perf tests without WS cache and non connected mode
authorDuarte Meneses <duarte.meneses@sonarsource.com>
Tue, 17 May 2016 08:52:21 +0000 (10:52 +0200)
committerDuarte Meneses <duarte.meneses@sonarsource.com>
Tue, 17 May 2016 08:52:21 +0000 (10:52 +0200)
tests/perf/src/test/java/org/sonarsource/sonarqube/perf/scanner/suite/FileSystemTest.java
tests/perf/src/test/java/org/sonarsource/sonarqube/perf/scanner/suite/IssuesModeTest.java

index a6c97d0ccee8ff7840eaa4b5c9406d06e815afc4..e1ba5264111f29e66eaf3327bf827a677273678a 100644 (file)
@@ -73,6 +73,7 @@ public class FileSystemTest extends PerfTestCase {
   private void run(int xmx, long expectedDuration) throws IOException {
     SonarRunner runner = SonarRunner.create()
       .setProperties(
+        "sonar.projectKey", "filesystemXmx" + xmx,
         "sonar.projectName", "filesystem xmx" + xmx,
         "sonar.projectVersion", "1.0",
         "sonar.sources", "src",
@@ -83,7 +84,7 @@ public class FileSystemTest extends PerfTestCase {
 
     orchestrator.executeBuild(runner);
 
-    Properties prof = readProfiling(baseDir, "project");
+    Properties prof = readProfiling(baseDir, "filesystemXmx" + xmx);
     perfRule.assertDurationAround(Long.valueOf(prof.getProperty("Index filesystem")), expectedDuration);
   }
 
index cced5e65d133adc7a831aecdeeaa61e2990e9035..3324c463bb2bcd94b28dcc6c4e7f8ab4adcebe98 100644 (file)
@@ -68,32 +68,6 @@ public class IssuesModeTest extends PerfTestCase {
     long duration = System.currentTimeMillis() - start;
     System.out.println("Issues analysis: " + duration + "ms");
 
-    perfRule.assertDurationAround(duration, 5230L);
+    perfRule.assertDurationAround(duration, 4200L);
   }
-
-  @Test
-  public void issues_mode_with_cache_scan_xoo_project() throws IOException {
-    File userHome = temp.newFolder();
-    orchestrator.getServer().provisionProject("sample", "xoo-sample");
-    orchestrator.getServer().associateProjectToQualityProfile("sample", "xoo", "one-xoo-issue-per-line");
-    SonarRunner runner = newScanner(
-      "-Xmx512m -server -XX:MaxPermSize=64m",
-      "sonar.analysis.mode", "issues",
-      "sonar.useWsCache", "true",
-      "sonar.userHome", userHome.getAbsolutePath(),
-      "sonar.showProfiling", "true");
-    long start = System.currentTimeMillis();
-    orchestrator.executeBuild(runner);
-    long firstDuration = System.currentTimeMillis() - start;
-    System.out.println("First issues analysis: " + firstDuration + "ms");
-
-    // caches are warmed
-    start = System.currentTimeMillis();
-    orchestrator.executeBuild(runner);
-    long secondDuration = System.currentTimeMillis() - start;
-    System.out.println("Second issues analysis: " + secondDuration + "ms");
-
-    perfRule.assertDurationAround(secondDuration, 3350L);
-  }
-
 }