summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2014-12-08 17:18:17 +0100
committerSimon Brandhof <simon.brandhof@sonarsource.com>2014-12-08 17:18:17 +0100
commit357f8f85cc94acc1216f5c0dd32f0218ad7758e5 (patch)
tree494951b3f849478b6ed416bdf6a1ecbb6ab2f704
parentea0fa88f0379acc96f8b7d45ecf295326201b7cb (diff)
downloadsonarqube-357f8f85cc94acc1216f5c0dd32f0218ad7758e5.tar.gz
sonarqube-357f8f85cc94acc1216f5c0dd32f0218ad7758e5.zip
Fix server-test-benchmarks assertions because of Lucene optimizations
-rw-r--r--server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/IssueIndexBenchmarkTest.java4
-rw-r--r--server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/SourceIndexBenchmarkTest.java2
2 files changed, 3 insertions, 3 deletions
diff --git a/server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/IssueIndexBenchmarkTest.java b/server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/IssueIndexBenchmarkTest.java
index 6ad0d6915a6..0344737515e 100644
--- a/server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/IssueIndexBenchmarkTest.java
+++ b/server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/IssueIndexBenchmarkTest.java
@@ -56,7 +56,7 @@ public class IssueIndexBenchmarkTest {
private static final Logger LOGGER = LoggerFactory.getLogger("benchmarkIssues");
- final static int PROJECTS = 1;
+ final static int PROJECTS = 100;
final static int FILES_PER_PROJECT = 100;
final static int ISSUES_PER_FILE = 100;
@@ -116,7 +116,7 @@ public class IssueIndexBenchmarkTest {
tester.get(EsClient.class).prepareOptimize("issues").get();
long dirSize = FileUtils.sizeOfDirectory(tester.getEsServerHolder().getHomeDir());
LOGGER.info(String.format("ES dir: " + FileUtils.byteCountToDisplaySize(dirSize)));
- benchmark.expectBetween("ES dir size (b)", dirSize, 385L * FileUtils.ONE_MB, 420L * FileUtils.ONE_MB);
+ benchmark.expectBetween("ES dir size (b)", dirSize, 200L * FileUtils.ONE_MB, 420L * FileUtils.ONE_MB);
}
private void benchmarkQueries() {
diff --git a/server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/SourceIndexBenchmarkTest.java b/server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/SourceIndexBenchmarkTest.java
index 8c55a25c39c..c9493ba6dc7 100644
--- a/server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/SourceIndexBenchmarkTest.java
+++ b/server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/SourceIndexBenchmarkTest.java
@@ -86,7 +86,7 @@ public class SourceIndexBenchmarkTest {
tester.get(EsClient.class).prepareOptimize(SourceLineIndexDefinition.INDEX).get();
long dirSize = FileUtils.sizeOfDirectory(tester.getEsServerHolder().getHomeDir());
LOGGER.info(String.format("ES dir: " + FileUtils.byteCountToDisplaySize(dirSize)));
- benchmark.expectBetween("ES dir size (b)", dirSize, 80L * FileUtils.ONE_MB, 100L * FileUtils.ONE_MB);
+ benchmark.expectBetween("ES dir size (b)", dirSize, 68L * FileUtils.ONE_MB, 74L * FileUtils.ONE_MB);
}
private void benchmarkQueries() {