aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDuarte Meneses <duarte.meneses@sonarsource.com>2016-05-17 10:52:21 +0200
committerDuarte Meneses <duarte.meneses@sonarsource.com>2016-05-17 10:52:21 +0200
commita2ca041dc1fa1ed762ca43f08fc65503f6b2596b (patch)
treeaa59fbb1a7560c97299dfcd7e175a7fbd22c7178 /tests
parent50bd94942ebec16d01446de78145b54bd4596d0f (diff)
downloadsonarqube-a2ca041dc1fa1ed762ca43f08fc65503f6b2596b.tar.gz
sonarqube-a2ca041dc1fa1ed762ca43f08fc65503f6b2596b.zip
Fix perf tests without WS cache and non connected mode
Diffstat (limited to 'tests')
-rw-r--r--tests/perf/src/test/java/org/sonarsource/sonarqube/perf/scanner/suite/FileSystemTest.java3
-rw-r--r--tests/perf/src/test/java/org/sonarsource/sonarqube/perf/scanner/suite/IssuesModeTest.java28
2 files changed, 3 insertions, 28 deletions
diff --git a/tests/perf/src/test/java/org/sonarsource/sonarqube/perf/scanner/suite/FileSystemTest.java b/tests/perf/src/test/java/org/sonarsource/sonarqube/perf/scanner/suite/FileSystemTest.java
index a6c97d0ccee..e1ba5264111 100644
--- a/tests/perf/src/test/java/org/sonarsource/sonarqube/perf/scanner/suite/FileSystemTest.java
+++ b/tests/perf/src/test/java/org/sonarsource/sonarqube/perf/scanner/suite/FileSystemTest.java
@@ -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);
}
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 cced5e65d13..3324c463bb2 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
@@ -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);
- }
-
}