From d1e393bd27b1d3cfdf1729a886751ab900318340 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Mon, 8 Dec 2014 11:48:50 +0100 Subject: [PATCH] Fix assertions of sonar-server-benchmarks --- .../org/sonar/server/benchmark/IssueIndexBenchmarkTest.java | 3 +-- .../org/sonar/server/benchmark/SourceIndexBenchmarkTest.java | 2 +- 2 files changed, 2 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 640cdcf6abd..b869154f5dc 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 @@ -93,7 +93,7 @@ public class IssueIndexBenchmarkTest { LOGGER.info(String.format("%d authorizations indexed in %d ms (%d docs/second)", PROJECTS, period, 1000 * PROJECTS / period)); // big range as absolute value is quite slow - benchmark.expectBetween("Time to index issue authorizations", period, 200L, 500L); + benchmark.expectBetween("Time to index issue authorizations", period, 10L, 500L); } private void benchmarkIssueIndexing() { @@ -174,7 +174,6 @@ public class IssueIndexBenchmarkTest { issue.setAssignee(users.next()); issue.setAuthorLogin(users.next()); issue.setLine(RandomUtils.nextInt()); - issue.setTechnicalCreationDate(new Date()); issue.setTechnicalUpdateDate(new Date()); issue.setFuncUpdateDate(new Date()); issue.setFuncCreationDate(new Date()); 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 8cd10343264..cc573b3e87a 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 @@ -82,7 +82,7 @@ public class SourceIndexBenchmarkTest { long dirSize = FileUtils.sizeOfDirectory(tester.getEsServerHolder().getHomeDir()); LOGGER.info(String.format("ES dir: " + FileUtils.byteCountToDisplaySize(dirSize))); - benchmark.expectBetween("ES dir size (b)", dirSize, 73L * FileUtils.ONE_MB, 80L * FileUtils.ONE_MB); + benchmark.expectBetween("ES dir size (b)", dirSize, 86L * FileUtils.ONE_MB, 93L * FileUtils.ONE_MB); } private void benchmarkQueries() { -- 2.39.5