From 357f8f85cc94acc1216f5c0dd32f0218ad7758e5 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Mon, 8 Dec 2014 17:18:17 +0100 Subject: [PATCH] Fix server-test-benchmarks assertions because of Lucene optimizations --- .../org/sonar/server/benchmark/IssueIndexBenchmarkTest.java | 4 ++-- .../org/sonar/server/benchmark/SourceIndexBenchmarkTest.java | 2 +- 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() { -- 2.39.5